⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@kekaczma
Copy link
Contributor

The test was previously disabled for CUDA/HIP because shared libraries were compiled without backend-specific targets, generating only SPIR-V device code. CUDA and HIP require PTX and AMDGCN respectively.

This change adds %cuda_options to compilation commands, which expands to:

  • -fsycl-targets=nvptx64-nvidia-cuda for CUDA
  • -fsycl-targets=amdgcn-amd-amdhsa for HIP
  • empty string for other backends (Level Zero, OpenCL)

This allows the test to run on all backends with appropriate device code.

@kekaczma kekaczma requested a review from a team as a code owner January 13, 2026 16:37
@kekaczma kekaczma requested a review from againull January 13, 2026 16:37
@kekaczma kekaczma marked this pull request as draft January 13, 2026 16:38
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from 01b2a4f to 64abd52 Compare January 13, 2026 19:55
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from c268e42 to 560d057 Compare January 14, 2026 11:52
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from a12d339 to 1c87f66 Compare January 16, 2026 10:58
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from 1c87f66 to 27a5fa1 Compare January 16, 2026 11:31
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from 27a5fa1 to 4b4572a Compare January 16, 2026 12:09
@kekaczma kekaczma force-pushed the multi-lib-cuda-hip-fix branch from 4b4572a to 4e686a9 Compare January 16, 2026 12:19
The test was marked UNSUPPORTED for CUDA/HIP because libraries were
compiled without backend-specific targets, generating only SPIR-V
device code which CUDA/HIP cannot execute.

Changes:
- Remove UNSUPPORTED directive for cuda/hip
- Add %{target} macro for backend-specific compilation
  - CUDA: -fsycl-targets=nvptx64-nvidia-cuda
  - HIP: -fsycl-targets=amdgcn-amd-amdhsa with detected arch
- Add %amd_arch_options substitution in lit.cfg.py to provide
  required --offload-arch flag for HIP (detected from device or
  defaulting to gfx1030 in build-only mode)

The test now passes on all three backends (Level Zero, CUDA, HIP).
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