diff --git a/include/dgl/runtime/parallel_for.h b/include/dgl/runtime/parallel_for.h index 85143de8e980..d4e9c3913a47 100644 --- a/include/dgl/runtime/parallel_for.h +++ b/include/dgl/runtime/parallel_for.h @@ -85,7 +85,7 @@ void parallel_for( auto chunk_size = divup((end - begin), num_threads); auto begin_tid = begin + tid * chunk_size; if (begin_tid < end) { - auto end_tid = std::min(end, chunk_size + begin_tid); + auto end_tid = std::min(end, static_cast(chunk_size + begin_tid)); try { f(begin_tid, end_tid); } catch (...) {