Skip to content

Add a narrow tile candidate for small ROCm INT4 matmuls - #22850

Open
mergennachin wants to merge 2 commits into
mainfrom
improve_voxtral_rocm
Open

mergennachin wants to merge 2 commits into
mainfrom
improve_voxtral_rocm

Conversation

@mergennachin

Copy link
Copy Markdown
Contributor

Offer a 16-column tile for ROCm queries with M=1..4 to increase parallelism. Retain every existing candidate so export-time autotuning can choose for the target GPU rather than imposing the MI300X choice. CUDA and other query sizes keep their existing candidate set; kernel arithmetic and the runtime are unchanged.

Validated with 46 focused tests, lintrunner, and full Voxtral W4/BF16 PTE exports executed by the native C++ runner on Linux MI300X. Inference on 30 seconds of audio improved from 12.270 to 7.332 seconds, and on 360 seconds from 156.649 to 97.771 seconds, with identical transcripts and matching token counts. The added candidate also compiled for representative RDNA2/3/4 targets and gfx950; those GPUs were not execution-tested. ROCm 7.1 remains unverified.

Lint was run directly because the pre-commit bootstrap cannot build its untokenize dependency under Python 3.14.

Authored with assistance from OpenAI Codex.

Offer a 16-column tile for ROCm queries with M=1..4 to increase parallelism. Retain every existing candidate so export-time autotuning can choose for the target GPU rather than imposing the MI300X choice. CUDA and other query sizes keep their existing candidate set; kernel arithmetic and the runtime are unchanged.

Validated with 46 focused tests, lintrunner, and full Voxtral W4/BF16 PTE exports executed by the native C++ runner on Linux MI300X. Inference on 30 seconds of audio improved from 12.270 to 7.332 seconds, and on 360 seconds from 156.649 to 97.771 seconds, with identical transcripts and matching token counts. The added candidate also compiled for representative RDNA2/3/4 targets and gfx950; those GPUs were not execution-tested. ROCm 7.1 remains unverified.

Lint was run directly because the pre-commit bootstrap cannot build its untokenize dependency under Python 3.14.

Authored with assistance from OpenAI Codex.
Copilot AI lite review requested due to automatic review settings September 15, 2026 19:14
@pytorch-bot

pytorch-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22850

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Pending, 1 Unclassified Failure

As of commit 0e64460 with merge base 026ca3f (image):

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 15, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

ROCm 7.1 and several target GPUs were not execution-tested, warranting final human review.

Pull request overview

Adds a ROCm-specific narrow INT4 matmul tile for small query sizes while preserving existing candidates.

Changes:

  • Adds conditional autotune pruning for ROCm M=1–4.
  • Adds configuration and small-shape correctness tests.
File summaries
File Description
backends/cuda/triton/kernels/int4_matmul.py Adds the narrow tile and ROCm-specific candidate selection.
backends/cuda/tests/test_int4_matmul.py Tests pruning behavior and small matmul shapes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review issues remain, and the changes include focused tests and validation.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@mergennachin

Copy link
Copy Markdown
Contributor Author

@claude Report the result of [test-voxtral-realtime-rocm-gfx1100-rocm7.2] when it finishes. I am especially interested in rtf result in the log (find a line that starts with "Voxtral RTF")

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Tracking test-voxtral-realtime-rocm-gfx1100-rocm7.2

  • Locate the target job in CI
  • Wait for the job to finish
  • Report the Voxtral RTF line from the log

Status update: the sibling unittest-rocm-gfx950-rocm7.2 and test-voxtral-realtime-rocm-gfx950-rocm7.2 jobs have finished successfully, but the target test-voxtral-realtime-rocm-gfx1100-rocm7.2 / linux-job is still in progress. Continuing to poll and will report the Voxtral RTF result once it completes.

View job run

needs: [voxtral-run-decision]
if: |
false && needs.voxtral-run-decision.outputs.run-gfx1100 == 'true' &&
needs.voxtral-run-decision.outputs.run-gfx1100 == 'true' &&

@digantdesai digantdesai Sep 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't land this FYI, we should update this to be on manual trigger only TBH

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

Labels

ciflow/rocm CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: rocm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants