Skip to content

cv-utils: build for rocm - #1320

Merged
github-actions[bot] merged 3 commits into
mainfrom
cv-utils-rocm
Nov 19, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
cv-utils-rocm

Conversation

@drbh

@drbh drbh commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

this pr adds a rocm build for cv-utils

same change as causal-conv1d in #1319: the rocm backend, rocm = "2.10" stable abi and a cpp-rocm kernel with the same sources and activation archs, and stable_utils.h picks the hip runtime under USE_ROCM. the kernels have no warp intrinsics and nms already uses 64 bit masks, so no kernel changes. the triton functions from #1182 run on rocm as is

built all rocm variants (rocm70, rocm71, rocm714, rocm72, rocm100) and ran the tests on mi300x (gfx942) with torch 2.10.0+rocm7.0, 2.12.1+rocm7.1 and 2.14.1+rocm7.2, 136 pass on each (4 skipped, they need two gpus). generic_nms keeps the same boxes as torchvision.ops.nms on rocm at 1k, 5k and 20k boxes and is within 4% of its speed

note: this lands in v2, sam3 video still loads version=1 so transformers needs to bump that before it picks up the rocm build. no version bump here since this only adds a backend

*keeping as draft until ci support rocm

@github-actions github-actions Bot added the chore Version bumps, releases, misc maintenance label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

This PR changes source code for the following kernel(s): cv-utils.

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

@drbh
drbh marked this pull request as draft November 10, 2026 19:08
@drbh

drbh commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

waiting on #1328 to run build

drbh added 2 commits November 13, 2026 12:49
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 cv-utils

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build cv-utils
Mode: build only
Target branch: pr-1320
PR head SHA: dcbcff67148be450245975eb1ab1a3588b7cd9a1
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (1):

drbh added a commit that referenced this pull request Nov 13, 2026
this pr fixes the `test-kernel-rocm` job for kernels that run triton in
their tests (first hit on #1320
https://github.com/huggingface/kernels-community/actions/runs/43476728896/job/132069439103)

tldr; the job runs in a bare `ubuntu:24.04` container with no compiler,
so triton fails to build its launcher with `RuntimeError: Failed to find
C compiler`. the base packages step now also installs `gcc` and
`libc6-dev` (`--no-install-recommends` skips the libc headers otherwise)

same #1182 cv-utils tests as #1318, `44 failed, 92 passed, 4 skipped`,
but a missing compiler instead of missing `Python.h` (the nix ci-test
python has headers). the cuda runners have a host gcc so
`test-kernel-gpu` passes

note: #1320 and #1329 need a rebuild after this is merged since the
workflow runs from main
@drbh

drbh commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build cv-utils

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build cv-utils
Mode: build only
Target branch: pr-1320
PR head SHA: dcbcff67148be450245975eb1ab1a3588b7cd9a1
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (1):

@drbh
drbh marked this pull request as ready for review November 13, 2026 20:01
@drbh

drbh commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build cv-utils

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build cv-utils
Mode: build only
Target branch: pr-1320
PR head SHA: 055cb63757da47d34a461306ba183558a2ff42d2
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (1):

@drbh

drbh commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot merge-and-upload cv-utils

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot merge-and-upload cv-utils
Mode: merge, build and upload
Target branch: ``
PR head SHA: 055cb63757da47d34a461306ba183558a2ff42d2
Workflows: `build.yaml, build-mac.yaml, build-windows.yaml`

Merge result: Pull Request successfully merged

Dispatched (1):

Hub uploads:

@github-actions
github-actions Bot merged commit 01cbe82 into main Nov 19, 2026
9 checks passed
@github-actions
github-actions Bot deleted the cv-utils-rocm branch November 19, 2026 13:48
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