Repository navigation
Fix warnings due to compiler regression with if constexpr - #11581
Conversation
Signed-off-by: Nghia Truong <[email protected]>
if constexpr having else branch
Codecov Report
@@ Coverage Diff @@
## branch-22.10 #11581 +/- ##
===============================================
Coverage ? 86.40%
===============================================
Files ? 145
Lines ? 22960
Branches ? 0
===============================================
Hits ? 19839
Misses ? 3121
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
davidwendt
left a comment
There was a problem hiding this comment.
Looks like there is still a compiler warning
https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cudf/job/prb/job/cudf-cpu-cuda-build/CUDA=11.5/11620/consoleFull
(search for warning #)
Co-authored-by: David Wendt <[email protected]>
| return {table_view{{tmp_column->view()}}, std::move(tmp_column)}; | ||
| } | ||
|
|
||
| // Using `if constexpr` again instead of `else` branch to avoid incorrect compiler warning about |
There was a problem hiding this comment.
After the removal of the variable above, can we bring this back into an else clause?
There was a problem hiding this comment.
Let's try that...
This reverts commit e61ef8a. Signed-off-by: Nghia Truong <[email protected]> # Conflicts: # cpp/src/lists/contains.cu
davidwendt
left a comment
There was a problem hiding this comment.
Looks like that worked.
if constexpr having else branchif constexpr
bdice
left a comment
There was a problem hiding this comment.
Thanks to all who weighed in on this PR -- it feels small, but it is nice that we came up with a workaround for the erroneous compiler warning and an improvement in code quality.
|
@gpucibot merge |
On some systems, CUDA compiler may have an issue such that it will throw unused variables warnings into your face if you use
if constexprwith anelsebranch. Such warnings were reported due to a recent merged PR (#10548).This PR rewrites the
elsebranch of theif constexprinlists/contains.cuinto a secondif constexprstatement with opposite condition to avoid the warnings.