Skip to content

ROCm: native HIP rotary kernel + quant architecture + WSL fixes - #9

Merged
hanzo-dev merged 1 commit into
mainfrom
rocm-feature-port
Jun 11, 2026
Merged

hanzo-dev merged 1 commit into
mainfrom
rocm-feature-port

Conversation

@hanzo-dev

Copy link
Copy Markdown
Member

Decomplects the ROCm ML stack onto main from perf/native-stack-campaign-2026-06.

main had rocm_backend + hanzo-rocm-kernels but no rope kernel and an incomplete quant path. This brings the complete, self-consistent ROCm ml stack:

  • hanzo-rocm-kernels: native HIP rope kernel (neox + gpt-j, f16/bf16/f32, GQA; per-token cache row computed in-kernel, no host round-trip) + native quant matvec kernels.
  • rocm_backend: rope_positions dispatch, RocmQuantType native quant path, lazy rocRAND generator + leaked rocBLAS/MIOpen handles to dodge WSL destructor SIGSEGVs at teardown.
  • quantized/: the decomplected quant architecture (iq_quants / iq_grids / quant_format, all IQ/TQ types) + the ROCm QStorage path (host-dequant -> f16 upload so matmul hits RDNA3.5 WMMA).
  • hanzo-nn: ROCm op implementations (silu-mul, rotary).

Verified on gfx1151 (Radeon 8060S): GGUF Q8_0 ~115 tok/s decode, correct output, clean exit.

🤖 Generated with Claude Code

Decomplected onto main from perf/native-stack-campaign-2026-06 (drops campaign
QuantKernel context main lacks):
- hanzo-rocm-kernels: native HIP rope kernel (neox+gpt-j, f16/bf16/f32, GQA),
  RopeKernel source; per-token cache row computed in-kernel (no host round-trip)
- rocm_backend: rope_positions dispatch; lazy rocRAND generator + leaked
  rocBLAS/MIOpen handles to dodge WSL destructor SIGSEGVs at teardown
- quantized/cuda.rs: IQ1/IQ2/IQ3/TQ dequant arms

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@hanzo-dev
hanzo-dev merged commit b1baa3b into main Jun 11, 2026
hanzo-dev added a commit that referenced this pull request Jun 15, 2026
ROCm: native HIP rotary kernel + quant architecture + WSL fixes
hanzo-dev added a commit that referenced this pull request Jul 27, 2026
ROCm: native HIP rotary kernel + quant architecture + WSL fixes
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