Skip to content

causal-conv1d: build for rocm - #1319

Draft
drbh wants to merge 2 commits into
mainfrom
causal-conv1d-rocm
Draft

drbh wants to merge 2 commits into
mainfrom
causal-conv1d-rocm

Conversation

@drbh

@drbh drbh commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

this pr adds a rocm build for causal-conv1d

  • build.toml: add the rocm backend, rocm = "2.10" stable abi and a cpp-rocm kernel with the same sources (same rocm-archs as activation)
  • causal_conv1d.cpp includes the hip runtime and aliases cudaStream_t under USE_ROCM since kernel-builder only hipifies the .cu files
  • torch_binding.cpp also registers the ops for ROCM_KERNEL. without it the kernel loads but every op raises NotImplementedError

the kernels already have the upstream USE_ROCM paths so no kernel source changes were needed

built all rocm variants (rocm70, rocm71, rocm714, rocm72, rocm100) with nix build .#backendBundle.rocm and ran the tests on mi300x (gfx942) against the bundle with torch 2.10.0+rocm7.0, 2.12.1+rocm7.1 and 2.14.1+rocm7.2

pytest -q tests/test_causal_conv1d_ci.py tests/test_causal_conv1d.py
8802 passed, 3888 skipped

same result on all three. the skips are the existing Only channel_last support initial_states skip. kernels benchmark shows 2.81x / 3.00x / 4.50x over the torch reference for base / large / xlarge

note: #1308 makes the same causal_conv1d.cpp change in the mamba-ssm copy and #1300 touches the same files, so one of these will need a rebase. transformers also needs rocm entries for causal_conv1d_fn and causal_conv1d_update in hub_kernels.py before it picks this up

*keeping as draft until ci support rocm

@drbh drbh mentioned this pull request Nov 10, 2026
@github-actions

Copy link
Copy Markdown

This PR changes source code for the following kernel(s): causal-conv1d.

If you have the kernel-bot build permissions, then trigger /kernel-bot build causal-conv1d yourself. Otherwise, a maintainer will review the PR and will take an appropriate action. Thanks for your patience.

@github-actions github-actions Bot added the chore Version bumps, releases, misc maintenance label Nov 10, 2026
@drbh
drbh marked this pull request as draft November 10, 2026 19:08
danieldk
danieldk previously approved these changes Nov 12, 2026

@danieldk danieldk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

@drbh
drbh marked this pull request as ready for review November 12, 2026 15:10
@drbh

drbh commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

waiting on #1328 to run build

@drbh
drbh marked this pull request as draft November 12, 2026 19:09
drbh added 2 commits November 13, 2026 12:46
Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
@drbh

drbh commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build causal-conv1d

@drbh
drbh force-pushed the causal-conv1d-rocm branch from a980c03 to 8f818fb Compare November 13, 2026 17:46
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build causal-conv1d
Mode: build only
Target branch: pr-1319
PR head SHA: 8f818fba681eeb8cd72d79963a351722af65b5f8
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (1):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Version bumps, releases, misc maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants