rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.25k stars 534 forks source link

Fix compiler warning about signed vs unsigned ints #6053

Closed hcho3 closed 2 months ago

hcho3 commented 2 months ago
src/cpp/src/fil/treelite_import.cu:496:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'const int' [-Wsign-compare]
103.2   496 |     ASSERT(leaf_vec_size == model.num_class[0], "treelite model inconsistent");
103.2       |           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
103.2 /rapids_triton/build/_deps/cuml-src/cpp/src/fil/treelite_import.cu:516:40: warning: comparison of integer expressions of different signedness: 'const int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
103.2   516 |         ASSERT(model.class_id[tree_id] == tree_id % static_cast<size_t>(model.num_class[0]),
103.2       |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (branch-24.10@2f11570). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## branch-24.10 #6053 +/- ## =============================================== Coverage ? 67.06% =============================================== Files ? 195 Lines ? 12920 Branches ? 0 =============================================== Hits ? 8665 Misses ? 4255 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

divyegala commented 2 months ago

/merge