Repository navigation
mamba-ssm: add rocm build - #1308
Conversation
|
This PR changes source code for the following kernel(s): If you have the kernel-bot build permissions, then trigger |
|
/kernel-bot build mamba-ssm |
|
Build request processed. Command: Dispatched (1):
|
|
/kernel-bot build mamba-ssm |
|
Build request processed. Command: Dispatched (1):
|
drbh
left a comment
There was a problem hiding this comment.
lgtm! the ci error should now be resolved by huggingface/kernels#984 and builds look good
|
/kernel-bot merge-and-upload mamba-ssm |
|
Build request processed. Command: Merge result: Pull Request successfully merged Dispatched (1):
Hub uploads: |
Related issue
n/a
What does this PR do?
Adds a ROCm build of mamba-ssm (selective scan + causal conv1d).
Motivation
The sources already carry upstream's
USE_ROCMpaths, so the only thing missing was the build config. This lets transformers' Mamba-family models use the hub kernel on AMD GPUs.Changes
rocmbackend andcpp-rocmkernels for selective scan and causal conv1d.reverse_scan.cuh: newer hipCUB droppedHIPCUB_WARP_THREADS(rocprim::warp_size()is gone), useHIPCUB_DEVICE_WARP_THREADSwhen it exists.reverse_scan.cuh: lane id was hard-coded to 32-wide warps (threadIdx.x & 0x1f), which breaks the backward reverse scan on wave64 (gfx9/MI300). Mask with the warp size instead; no change on CUDA.test_transformers_compile.py: map layers to therocmdevice on HIP, otherwise kernelize silently falls back.Testing
pytest -m kernels_cigives 646 passed, 3 failed.Checklist