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

Avoid deprecation warning in NVHPC #1459

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

cz4rs
Copy link
Contributor

@cz4rs cz4rs commented Aug 5, 2022

Fixes #1458

NVHPC does not respect silencing the warning with BENCHMARK_DISABLE_DEPRECATED_WARNING. I was unable to find suitable option for #pragma nv_diag_suppress, so when NVCC is detected just skip the deprecated attribute (as is done in the #else section).

@cz4rs cz4rs force-pushed the nvhpc-deprecation-warning branch from 71bda6f to 15f8d9c Compare August 8, 2022 10:14
@@ -182,7 +182,7 @@ State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif
#if defined(__CUDACC__)
#if defined(__NVCC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not directly related: use more general identification macro for compiler detection.
Reference: https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-identification-macro.

@dmah42 dmah42 merged commit a476d0f into google:main Aug 8, 2022
@dmah42
Copy link
Member

dmah42 commented Aug 8, 2022

great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] NVHPC deprecation warning
2 participants