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

[BUG] Wrap #pragma nv_* in macro that is enabled only for nvcc #13106

Closed
ttnghia opened this issue Apr 10, 2023 · 0 comments · Fixed by #13110
Closed

[BUG] Wrap #pragma nv_* in macro that is enabled only for nvcc #13106

ttnghia opened this issue Apr 10, 2023 · 0 comments · Fixed by #13110
Assignees
Labels
bug Something isn't working

Comments

@ttnghia
Copy link
Contributor

ttnghia commented Apr 10, 2023

The pragma #pragma nv_* is used in many places like this:

However, these #pragma nv_ are defined only for nvcc compiler. Host compilers don't understand them. Thus, they may issue warnings due to unknown pragma, such as:

In file included from /opt/conda/conda-bld/work/cpp/include/cudf/column/column_view.hpp:22,
                 from cudf_kafka/_lib/kafka.cpp:967:
/opt/conda/conda-bld/work/cpp/include/cudf/utilities/type_dispatcher.hpp:436: warning: ignoring '#pragma nv_exec_check_disable ' [-Wunknown-pragmas]
  436 | #pragma nv_exec_check_disable

We should wrap these #pragma nv_ into macro so only nvcc can see them. For example:

#ifdef __CUDACC__
#pragma nv_exec_check_disable
#endif
@ttnghia ttnghia added bug Something isn't working Needs Triage Need team to review and classify labels Apr 10, 2023
@hyperbolic2346 hyperbolic2346 self-assigned this Apr 10, 2023
rapids-bot bot pushed a commit that referenced this issue Apr 11, 2023
This change wraps the NVCC-specific `#pragma` macros inside an `ifdef` to prevent compilation warnings as described in issue #13106

closes #13106

Authors:
  - Mike Wilson (https://github.com/hyperbolic2346)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Nghia Truong (https://github.com/ttnghia)

URL: #13110
@bdice bdice removed the Needs Triage Need team to review and classify label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants