Skip to content

[ROCm 6.2.2] Conditionally define CUDA_SUCCESS only if it's not#8793

Merged
kmaehashi merged 1 commit into
cupy:mainfrom
HollowMan6:compile
Dec 9, 2024
Merged

[ROCm 6.2.2] Conditionally define CUDA_SUCCESS only if it's not#8793
kmaehashi merged 1 commit into
cupy:mainfrom
HollowMan6:compile

Conversation

@HollowMan6
Copy link
Copy Markdown
Contributor

To fix the following compilation error when building for AMD GPUs:

  In file included from cupy_backends/cuda/libs/cusolver.cpp:847:
  In file included from cupy_backends/cuda/libs/../../cupy_lapack.h:12:
  In file included from cupy_backends/cuda/libs/../../hip/cupy_rocsolver.h:4:
  In file included from cupy_backends/cuda/libs/../../hip/cupy_hip.h:4:
  cupy_backends/cuda/libs/../../hip/cupy_hip_common.h:18:16: error: redefinition of 'hipSuccess' as different kind of symbol
     18 | const CUresult CUDA_SUCCESS = static_cast<CUresult>(0);
        |                ^
rocm/6.2.2/include/hip/amd_detail/amd_hip_runtime.h:111:22: note: expanded from macro 'CUDA_SUCCESS'
    111 | #define CUDA_SUCCESS hipSuccess
        |                      ^
rocm/6.2.2/include/hip/hip_runtime_api.h:288:5: note: previous definition is here
    288 |     hipSuccess = 0,  ///< Successful completion.
        |     ^

@kmaehashi kmaehashi added cat:enhancement Improvements to existing features to-be-backported Pull-requests to be backported to stable branch prio:high labels Dec 9, 2024
@kmaehashi kmaehashi self-assigned this Dec 9, 2024
Comment thread .gitignore Outdated
To fix the following compilation error when building for AMD GPUs:

```log
  In file included from cupy_backends/cuda/libs/cusolver.cpp:847:
  In file included from cupy_backends/cuda/libs/../../cupy_lapack.h:12:
  In file included from cupy_backends/cuda/libs/../../hip/cupy_rocsolver.h:4:
  In file included from cupy_backends/cuda/libs/../../hip/cupy_hip.h:4:
  cupy_backends/cuda/libs/../../hip/cupy_hip_common.h:18:16: error: redefinition of 'hipSuccess' as different kind of symbol
     18 | const CUresult CUDA_SUCCESS = static_cast<CUresult>(0);
        |                ^
rocm/6.2.2/include/hip/amd_detail/amd_hip_runtime.h:111:22: note: expanded from macro 'CUDA_SUCCESS'
    111 | #define CUDA_SUCCESS hipSuccess
        |                      ^
rocm/6.2.2/include/hip/hip_runtime_api.h:288:5: note: previous definition is here
    288 |     hipSuccess = 0,  ///< Successful completion.
        |     ^
```

Signed-off-by: Hollow Man <[email protected]>
@HollowMan6 HollowMan6 requested a review from kmaehashi December 9, 2024 08:04
@kmaehashi kmaehashi merged commit 7b20979 into cupy:main Dec 9, 2024
Copy link
Copy Markdown
Member

@kmaehashi kmaehashi left a comment

Choose a reason for hiding this comment

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

Thanks!

@kmaehashi kmaehashi added this to the v14.0.0a1 milestone Dec 9, 2024
chainer-ci pushed a commit to chainer-ci/cupy that referenced this pull request Dec 9, 2024
[ROCm 6.2.2] Conditionally define CUDA_SUCCESS only if it's not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:enhancement Improvements to existing features prio:high to-be-backported Pull-requests to be backported to stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants