Skip to content

Commit 30653f5

Browse files
authored
Merge pull request #2048 from rhatdan/fix-issue-2045
Fix AMD GPU image selection on arm64 for issue #2045
2 parents 3fe260e + 8d8f79e commit 30653f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ramalama/common.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,10 @@ def check_ascend() -> Literal["cann"] | None:
433433

434434

435435
def check_rocm_amd() -> Literal["hip"] | None:
436+
if is_arm():
437+
# ROCm is not available for arm64, use Vulkan instead
438+
return None
439+
436440
gpu_num = 0
437441
gpu_bytes = 0
438442
for i, (np, props) in enumerate(amdkfd.gpus()):
@@ -461,6 +465,10 @@ def check_rocm_amd() -> Literal["hip"] | None:
461465
return None
462466

463467

468+
def is_arm() -> bool:
469+
return platform.machine() in ('arm64', 'aarch64')
470+
471+
464472
def check_intel() -> Literal["intel"] | None:
465473
igpu_num = 0
466474
# Device IDs for select Intel GPUs. See: https://dgpu-docs.intel.com/devices/hardware-table.html

0 commit comments

Comments
 (0)