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

Support ROCm 6 #8319

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Support ROCm 6 #8319

wants to merge 2 commits into from

Conversation

Azusachan
Copy link

ROCm 6 introduced various changes on its API. In particular,

  • Removal of gcnarch from hipDeviceProp_t structure
  • Renaming of ‘memoryType’ in hipPointerAttribute_t structure to ‘type’

This patch provides support on ROCm 6.0.0 and above.

ROCm 6 introduced various changes on its API. In particular,
* Removal of gcnarch from hipDeviceProp_t structure
* Renaming of ‘memoryType’ in hipPointerAttribute_t structure to ‘type’

This patch allows cupy to be built on this version.
@Azusachan Azusachan closed this May 2, 2024
@Azusachan Azusachan reopened this May 2, 2024
@kmaehashi kmaehashi self-assigned this May 7, 2024
@kmaehashi kmaehashi added cat:enhancement Improvements to existing features to-be-backported Pull-requests to be backported to stable branch prio:medium labels May 7, 2024
@littlewu2508
Copy link

littlewu2508 commented May 23, 2024

cupy_backends/cuda/libs/_cnvrtc.pxi also needs to update to avoid nvrtc.getVersion error, thanks to @Berrysoft

From 05233251a78e86bd269f79272561de22991843a1 Mon Sep 17 00:00:00 2001
From: Yiyang Wu <[email protected]>
Date: Thu, 23 May 2024 20:41:14 +0800
Subject: [PATCH] Add ROCm 6 in runtime_version

---
 cupy_backends/cuda/libs/_cnvrtc.pxi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cupy_backends/cuda/libs/_cnvrtc.pxi b/cupy_backends/cuda/libs/_cnvrtc.pxi
index 9f02b5522..b2b06aa4f 100644
--- a/cupy_backends/cuda/libs/_cnvrtc.pxi
+++ b/cupy_backends/cuda/libs/_cnvrtc.pxi
@@ -139,5 +139,8 @@ cdef SoftLink _get_softlink():
         elif runtime_version < 6_00_00000:
             # ROCm 5.x
             libname = 'libamdhip64.so.5'
+        elif runtime_version < 7_00_00000:
+            # ROCm 6.x
+            libname = 'libamdhip64.so.6'
 
     return SoftLink(libname, prefix, mandatory=True)
-- 
2.44.0

@Berrysoft
Copy link

@littlewu2508 the comment should be # ROCm 6.x :)

@littlewu2508
Copy link

the comment should be # ROCm 6.x :)

Thanks, I've edited the patch

case 1 /* hipMemoryTypeDevice */:
attributes->type = (hipMemoryType)2; /* cudaMemoryTypeDevice */
return status;
#elif

Choose a reason for hiding this comment

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

Suggested change
#elif
#else

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:medium to-be-backported Pull-requests to be backported to stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants