Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Review] Correct unused parameter warnings in rolling algorithms #8390

Conversation

robertmaynard
Copy link
Contributor

Starting in CUDA 11.3, nvcc will start to unconditionally warn about unused parameters on functions/methods that are in anonymous namespaces.

@robertmaynard robertmaynard requested a review from a team as a code owner May 27, 2021 13:44
@robertmaynard robertmaynard added the 3 - Ready for Review Ready for review by team label May 27, 2021
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label May 27, 2021
@robertmaynard robertmaynard added code quality improvement Improvement / enhancement to an existing function non-breaking Non-breaking change and removed code quality labels May 27, 2021
Copy link
Contributor

@ttnghia ttnghia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a good/better practice to use Type /*variable_name*/ instead of removing the unused variable name entirely. Having the name there will let us a better hint about what is sitting at the parameter position.

@robertmaynard
Copy link
Contributor Author

It is a good/better practice to use Type /*variable_name*/ instead of removing the unused variable name entirely. Having the name there will let us a better hint about what is sitting at the parameter position.

I don't mind updating the approach but it would be great to have a consistent style. When I brought this up on slack people wanted me to drop the unused names so they can't go out of sync, so that is what I used for both of the open PR's and #8239, and #8232

@harrism
Copy link
Member

harrism commented May 31, 2021

Does NVCC respect the C++17 ``[[maybe_unused]]` attribute? https://en.cppreference.com/w/cpp/language/attributes/maybe_unused

@ttnghia
Copy link
Contributor

ttnghia commented May 31, 2021

Does NVCC respect the C++17 ``[[maybe_unused]]` attribute? https://en.cppreference.com/w/cpp/language/attributes/maybe_unused

I think it should, as C++ standard is the same for both host and device code compilation.

@robertmaynard
Copy link
Contributor Author

Does NVCC respect the C++17 ``[[maybe_unused]]` attribute? https://en.cppreference.com/w/cpp/language/attributes/maybe_unused

I think it should, as C++ standard is the same for both host and device code compilation.

This warning is generated by a component of the CUDA compiler unconditionally when invoked independent of the standard level, or if the code is host or device. In addition this component currently doesn't respect any [[maybe_unused]] attributes and will generate these warnings.

So for now we have to jump through these hoops.

@robertmaynard
Copy link
Contributor Author

rerun tests

@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.08@a9f15b8). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 7f0c29a differs from pull request most recent head 31eb643. Consider uploading reports for the commit 31eb643 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.08    #8390   +/-   ##
===============================================
  Coverage                ?   82.84%           
===============================================
  Files                   ?      109           
  Lines                   ?    17913           
  Branches                ?        0           
===============================================
  Hits                    ?    14840           
  Misses                  ?     3073           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9f15b8...31eb643. Read the comment docs.

@robertmaynard
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit b41b2ea into rapidsai:branch-21.08 Jun 9, 2021
@robertmaynard robertmaynard deleted the bug/correct_unused_parameters_in_rolling branch June 9, 2021 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants