Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
build(hip): -Dhip-arch accepts gfx1030 (RDNA2) and gfx1100 (RDNA3)
The runtime and the affine row kernel need no change: the reduction is 32 lanes wide on any wave size, and the
loader takes only the device's exact object. On a Radeon PRO W7800 (gfx1100), hip-gpu-test passes 16/16 and
hip-affine-test 22/22; a gfx1151 object on it is refused with UnsupportedArchitecture.
  • Loading branch information
BlivionIaG committed Oct 10, 2026
commit b69f009d16b43a74e33527ebc44c50eef85a3be5
5 changes: 3 additions & 2 deletions zig/build/hip.zig
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ pub fn steps(b: *std.Build, target: std.Build.ResolvedTarget, test_step: *std.Bu
const hip_include = b.option([]const u8, "hip-include", "HIP header directory") orelse
b.pathResolve(&.{ std.fs.path.dirname(hipcc_resolved) orelse "/opt/rocm/bin", "..", "include" });
const hip_arch = b.option([]const u8, "hip-arch", "Exact GPU architecture for the probe code object") orelse "gfx1151";
if (!std.mem.eql(u8, hip_arch, "gfx1150") and !std.mem.eql(u8, hip_arch, "gfx1151") and !std.mem.eql(u8, hip_arch, "gfx1201"))
@panic("unsupported HIP probe architecture");
for ([_][]const u8{ "gfx1030", "gfx1100", "gfx1150", "gfx1151", "gfx1201" }) |supported| {
if (std.mem.eql(u8, hip_arch, supported)) break;
} else @panic("unsupported HIP probe architecture");
const hip_compile = b.addSystemCommand(&.{ hipcc, "--genco", b.fmt("--offload-arch={s}", .{hip_arch}), "-O2", "-ffp-contract=off" });
hip_compile.addFileArg(b.path("zig/kernels/hip/runtime_tests.hip"));
hip_compile.addArg("-o");
Expand Down