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] CUDA_TRY macro conflicts with other RAPIDS libraries #9660

Closed
jlowe opened this issue Nov 11, 2021 · 3 comments · Fixed by #10589
Closed

[BUG] CUDA_TRY macro conflicts with other RAPIDS libraries #9660

jlowe opened this issue Nov 11, 2021 · 3 comments · Fixed by #10589
Labels
0 - Backlog In queue waiting for assignment bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS

Comments

@jlowe
Copy link
Member

jlowe commented Nov 11, 2021

Describe the bug
While trying to integrate RAPIDS RAFT and cuDF into the same application we ran across a compilation error due to a macro name conflict, e.g.:

[INFO]      [exec] In file included from /code/raft/cpp/include/raft/linalg/eig.cuh:20,
[INFO]      [exec]                  from /code/spark-rapids-ml/native/src/ml_utils.cu:6:
[INFO]      [exec] /code/raft/cpp/include/raft/cudart_utils.h:56: error: "CUDA_TRY" redefined [-Werror]
[INFO]      [exec]    56 | #define CUDA_TRY(call)                                                        \
[INFO]      [exec]       |
[INFO]      [exec] In file included from /miniconda3/include/cudf/utilities/type_dispatcher.hpp:22,
[INFO]      [exec]                  from /miniconda3/include/cudf/utilities/traits.hpp:20,
[INFO]      [exec]                  from /miniconda3/include/cudf/column/column_view.hpp:19,
[INFO]      [exec]                  from /miniconda3/include/cudf/column/column.hpp:18,
[INFO]      [exec]                  from /miniconda3/include/cudf/column/column_factories.hpp:18,
[INFO]      [exec]                  from /code/spark-rapids-ml/native/src/ml_utils.cu:1:
[INFO]      [exec] /miniconda3/include/cudf/utilities/error.hpp:102: note: this is the location of the previous definition
[INFO]      [exec]   102 | #define CUDA_TRY(call)                                            \
[INFO]      [exec]       |

Steps/Code to reproduce bug
Try to include raft/cudart_utils.h and cudf/utilities/error.hpp in the same compilation unit

Expected behavior
cudf macros do not conflict with definitions from other RAPIDS libraries (ideally with any library). Changing CUDA_TRY to CUDF_CUDA_TRY is one potential solution.

Additional context
rapidsai/raft#128 is the corresponding bug for RAFT

@jlowe jlowe added bug Something isn't working Needs Triage Need team to review and classify libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS labels Nov 11, 2021
@beckernick beckernick removed the Needs Triage Need team to review and classify label Nov 12, 2021
@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@jlowe
Copy link
Member Author

jlowe commented Dec 13, 2021

Still relevant and would like to see this fixed.

@jrhemstad jrhemstad added the 0 - Backlog In queue waiting for assignment label Dec 13, 2021
@jrhemstad
Copy link
Contributor

Similar to #9797, we should rename to CUDF_CUDA_TRY.

rapids-bot bot pushed a commit that referenced this issue Apr 5, 2022
…DF_CHECK_CUDA. (#10589)

This PR renames the `CUDA_TRY` macro to `CUDF_CUDA_TRY` to avoid name conflicts with other libraries. Resolves #9660.

Similarly, `CHECK_CUDA` has been renamed to `CUDF_CHECK_CUDA`.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Jake Hemstad (https://github.com/jrhemstad)
  - Jason Lowe (https://github.com/jlowe)
  - David Wendt (https://github.com/davidwendt)

URL: #10589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants