Skip to content

kernel-builder: add gfx1150/gfx1151 to supported ROCm archs - #833

Closed
AzeezIsh wants to merge 1 commit into
huggingface:mainfrom
AzeezIsh:rocm-gfx115x
Closed

AzeezIsh wants to merge 1 commit into
huggingface:mainfrom
AzeezIsh:rocm-gfx115x

Conversation

@AzeezIsh

Copy link
Copy Markdown

Summary

Adds gfx1150/gfx1151 (RDNA 3.5 — Strix Point / Strix Halo) to the hardcoded HIP_SUPPORTED_ARCHS allowlist in the generated CMake preamble.

Without this, a kernel declaring rocm-archs = ["gfx1151"] in build.toml intersects to an empty set in hip_archs_intersection — the build succeeds but emits no --offload-arch flags, silently shipping a published variant containing no device code for the requested target.

The toolchain already supports these archs end-to-end:

  • nix-builder ROCm 7.14 clr gpuTargets covers gfx1150gfx1153 (and gfx1250)
  • upstream PyTorch's ROCm wheel arch list added gfx1150/gfx1151 in 2.10
  • ROCm 7.x clang accepts --offload-arch=gfx1151 (verified on Strix Halo hardware)

Verified the mechanics directly: with the updated list, hip_archs_intersection keeps gfx1151 and --offload-arch=gfx1151 is emitted per-source; with the old list the kernel's arch set is empty.

Notes for reviewers

  • gfx1102/gfx1103 (other RDNA 3 iGPUs) are also absent from the allowlist; left them out to keep this scoped — happy to add if preferred.
  • The kernels init scaffold default rocm-archs list in src/init/templates/build.toml is unchanged — didn't want to expand the default build matrix for new kernels without maintainer input.

Context: unblocks a gfx1151 ROCm kernel contribution tracked in huggingface/kernels-community#1149.

Test plan

  • cmake -P check: rocm-archs = ["gfx1151"] survives hip_archs_intersection against the updated HIP_SUPPORTED_ARCHS (empty before, gfx1151 after)
  • Full torch*-rocm* variant build of a kernel with rocm-archs = ["gfx1151"] producing a gfx1151 code object (needs Nix builder run)

Generated with Devin

The generated preamble hardcodes HIP_SUPPORTED_ARCHS and forces it into
PYTORCH_ROCM_ARCH, so it is the sole gate for which gfx targets a kernel
can emit code objects for. A kernel requesting gfx1151 (RDNA 3.5 /
Strix Halo) in rocm-archs intersected to an empty set: the build
succeeded but emitted no --offload-arch flags, silently shipping a
variant with no device code.

The Nix toolchain already supports these targets (clr passthru
gpuTargets covers gfx1150-gfx1153 in ROCm 7.14, and upstream PyTorch's
ROCm wheel arch list added them in 2.10), so the only change needed is
the preamble allowlist.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Hi @AzeezIsh, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/huggingface/kernels/blob/main/CONTRIBUTING.md for more details.

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.

1 participant