Skip to content

Fix HIP classification in backend device test - #238

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
Blakeolson21:test/hip-backend-device-resolution
Aug 14, 2026
Merged

Fix HIP classification in backend device test#238
0xShug0 merged 1 commit into
0xShug0:mainfrom
Blakeolson21:test/hip-backend-device-resolution

Conversation

@Blakeolson21

Copy link
Copy Markdown
Contributor

What changed

backend_device_resolution_test mirrors the backend registry mapping from src/framework/core/backend.cpp, but it still treated the ROCm registry as CUDA after HIP became its own BackendType.

On a HIP build, the test would discover ROCm, request a CUDA backend, and fail instead of validating the enumerated HIP device.

This change:

  • maps ROCm to BackendType::Hip in the test contract
  • adds the missing HIP label
  • checks that an unregistered HIP backend is rejected, alongside CUDA, Vulkan, and Metal

Validation

Both focused builds and test runs passed on an Apple M3 Max with AppleClang 17.0.0:

macOS CPU core build
checked 0 accelerator registries
backend_device_resolution_test passed

macOS Metal core build
checked 1 accelerator registry
backend_device_resolution_test passed

The prior project warning about the unhandled BackendType::Hip enum value is gone. The remaining compile warning is in the vendored ggml CPU backend.

I did not have a usable HIP host for this change. A Windows CUDA attempt reached commit 4584379101c765a64fac1abc4d1e8f72fc42d2f4, but the host lacked the official CUDA Toolkit, so I am not claiming Windows GPU coverage.

@0xShug0
0xShug0 merged commit cef76b0 into 0xShug0:main Aug 14, 2026
6 checks passed
@0xShug0

0xShug0 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants