Unverified Commit 6069f34c authored by Andrzej Kotłowski's avatar Andrzej Kotłowski Committed by GitHub
Browse files

[Performance] Fix for number of threads in COOToCSR (#5017)


Co-authored-by: default avatarHongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
parent a506ebe8
...@@ -639,7 +639,7 @@ N*P). ...@@ -639,7 +639,7 @@ N*P).
template <DGLDeviceType XPU, typename IdType> template <DGLDeviceType XPU, typename IdType>
CSRMatrix COOToCSR(COOMatrix coo) { CSRMatrix COOToCSR(COOMatrix coo) {
if (!coo.row_sorted) { if (!coo.row_sorted) {
const int64_t num_threads = omp_get_num_threads(); const int64_t num_threads = omp_get_max_threads();
const int64_t num_nodes = coo.num_rows; const int64_t num_nodes = coo.num_rows;
const int64_t num_edges = coo.row->shape[0]; const int64_t num_edges = coo.row->shape[0];
// Besides graph density, num_threads is also taken into account. Below // Besides graph density, num_threads is also taken into account. Below
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment