Unverified Commit e7ad4c9c authored by sanchit-misra's avatar sanchit-misra Committed by GitHub
Browse files

Fixes the bug when total_nnz is > integer limit (#3766)

parent 4b182b90
...@@ -454,7 +454,7 @@ void SpMMRedopCsrOpt( ...@@ -454,7 +454,7 @@ void SpMMRedopCsrOpt(
const IdType K = csr.num_cols; const IdType K = csr.num_cols;
const IdType* indptr = csr.indptr.Ptr<IdType>(); const IdType* indptr = csr.indptr.Ptr<IdType>();
CHECK_NOTNULL(indptr); CHECK_NOTNULL(indptr);
const int total_nnz = indptr[M]; const IdType total_nnz = indptr[M];
if (M <= 0 || K <= 0 || N <= 0 || total_nnz <= 0) return; if (M <= 0 || K <= 0 || N <= 0 || total_nnz <= 0) return;
const double avg_degree = total_nnz * 1.0 / M; const double avg_degree = total_nnz * 1.0 / M;
......
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