Repository navigation
feat(hipdnn): hipdnn_vllm, a drop-in vLLM plugin that runs vLLM ops through hipDNN - #14255
Draft
dpeabody-amd wants to merge 1 commit into
Draft
dpeabody-amd wants to merge 1 commit into
dpeabody-amd wants to merge 1 commit into
Conversation
…hrough hipDNN A pip-installable vLLM general plugin under projects/hipdnn/tools/hipdnn_vllm. It registers one attention backend (HIPDNN), vLLM IR providers for rms_norm and fused_add_rms_norm, CustomOp overrides for MMEncoderAttention, LayerNorm and Conv2d/Conv3d, and an opt-in unquantized-linear route. Every op falls back to vLLM's own kernel per call when hipDNN declines, and a coverage report records each route and decline reason. Includes a torch C++ extension over the hipDNN C++ frontend, wheel and Docker packaging that bundles a hipDNN backend and providers, a local vLLM capability patch, tests and a validation harness.
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #14255 +/- ##
========================================
Coverage 75.95% 75.95%
========================================
Files 2880 2880
Lines 479080 479080
Branches 71971 71971
========================================
+ Hits 363883 363884 +1
+ Misses 90339 90338 -1
Partials 24858 24858
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
SamuelReeder
added a commit
that referenced
this pull request
Oct 30, 2026
…ailures pre-exist on #14255 head
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE ID : AICK-1847
Draft, depends on the hipDNN PRs below for its paged attention engines. The plugin is self-contained under
projects/hipdnn/tools/hipdnn_vllm/, next totools/hipdnn_torch/, and touches no other files. Without the engines below its attention backend falls back to vLLM's Triton kernels; with them, decoder attention runs on hipDNN.hipkernel:AttentionPagedUnified, gfx942/gfx950 (stacked on feat(hipdnn): paged K/V SDPA contract and references #14245)hipkernel:Gfx1151WmmaAttention, RDNA (stacked on feat(hipdnn,hip-kernel-provider): ship the RDNA SDPA catalog on the new rocKE kernels; retire wmma_fmha_fwd #13897)Summary
hipdnn_vllmis an out-of-tree vLLM plugin that routes vLLM operations through hipDNN on ROCm. There are no vLLM source changes and no model changes. Youpip installthe wheel, then runvllm serve <model> --attention-backend HIPDNN. It is not registered upstream in vLLM; it targets users who want to try hipDNN under vLLM on RDNA (gfx110X, gfx1151, gfx120X) or CDNA (gfx942, gfx950).When hipDNN declines a call (no engine for that graph), the call runs on vLLM's own kernel instead, and a per-process coverage report records every route and decline reason. Output therefore stays correct whatever the installed engines cover. As new provider engines land, more calls route to hipDNN without any plugin change.
What changes
vllm.general_pluginsentry point. It is idempotent and does no GPU work at registration.HIPDNN:sink_token.hipdnnproviders forrms_normandfused_add_rms_norm, selected with--ir-op-priority.MMEncoderAttention(ViT attention),LayerNormandConv2d/Conv3d. Conv is opt-in.csrc/), a torch extension over the hipDNN C++ frontend:BUILD_PINS.toml._Cloads them privately by explicit path (frontend runtime-load mode,RTLD_LOCAL), while torch's bundled copy stays loaded and idle.python -m hipdnn_vllm doctorchecks the install.patches/vllm/0001): replaces aget_name() == "TRITON_ATTN"assert for chunk-lookback models with asupports_chunk_lookback()capability check. It is applied byscripts/apply_vllm_patches.shand the Dockerfile. It's a candidate for upstreaming.HIPDNN_VLLM_COMGR_CACHE=keep.validation/) for Slurm clusters.Behaviour and API changes
--attention-backend HIPDNNor names thehipdnnIR provider. The default ops are attention, encoder attention, rms_norm, fused_add_rms_norm and layer_norm; linear and conv are opt-in.Known integration work
HIPDNN_SRCinscripts/build_wheel.sh).csrc/graphs/sdpa.cpp) and the encoder-attention builder overlap; consolidating them is a follow-up.Validation (Linux, Slurm compute nodes)
All runs below use this PR's exact commit. They install the release wheels built from it (one per GPU family: gfx94X, gfx950, gfx110X-all, gfx120X-all, gfx1151), with no source overlay. Each wheel bundles a hipDNN built from the engine PRs (#14245, #14247, #14254), including their sink support. Each wheel's build record names this commit, and both trees were clean.
Test suites from the installed wheels
doctorNO_ENGINE). The remaining xfails, on every architecture, are declared declines such as fp32 encoder attention and row-strided norms. Each case checks that the op falls back correctly.csrc/. During development, a KV pool larger than 4 GiB ran with no fallbacks on gfx1100 and gfx1151 (Gemma-3-4B, strict mode).End-to-end model matrix (vLLM default scheduler settings, FULL_AND_PIECEWISE CUDA graphs)
Models: Qwen3-8B, Phi-3-mini, Gemma-3-4B, gpt-oss-20b, Qwen2.5-VL-3B and bge-m3, on all five architectures.
Not run (too large for the GPU):
Method: each model is run with the plugin off (the vLLM TRITON_ATTN baseline) and with the plugin's default op set. The accuracy measure is teacher-forced top-1 agreement with the plugin-off run. Two references come from the same job:
vllm_cnorm kernels, a non-hipDNN swap of the same ops.Routing:
NO_ENGINE.NO_ENGINEon CDNA.noncollapsible_rows.Accuracy:
vllm_cswap:vllm_cswapPhi-3-mini passes on gfx1100 and gfx1201 (0.990). On gfx950 its accuracy is 0.991, with attention on fallback.
Throughput relative to plugin-off vLLM (TRITON_ATTN):
¹ Attention falls back here, so only the norms run on hipDNN.
ASIC coverage
gfx942, gfx950, gfx1100, gfx1151 and gfx1201, which are vLLM's supported ROCm GPUs. Linux only (vLLM has no native Windows support).