Skip to content

benchmark: add Qwen3-VL vision-encoder (ViT) SDPA config + GB300 results - #598

Merged
vedaanta merged 3 commits into
NVIDIA:developfrom
vedaanta:qwen3vl-vit-bench
Aug 15, 2026
Merged

benchmark: add Qwen3-VL vision-encoder (ViT) SDPA config + GB300 results#598
vedaanta merged 3 commits into
NVIDIA:developfrom
vedaanta:qwen3vl-vit-bench

Conversation

@vedaanta

@vedaanta vedaanta commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a sdpa_benchmark_training config for the Qwen3-VL vision encoder (ViT) self-attention as exercised by image/video inference, plus GB300 results (CSV + chart).

  • Model preset: 16 MHA heads, head_dim 72 zero-padded to 80 (the 16-byte-alignment contract fp8 kernels require and production integrations run; reported TFLOPS count d=80).
  • Mask/pass: bidirectional (no_mask), forward-only, batch 1 — ViT inference.
  • Sequence lengths: six real per-image patch-grid token counts from a production inference trace (8836 = 94², 15376 = 124², 24336 = 156², 35344 = 188², 47376, 62500 = 250²). They span the trace's per-forward FLOPs distribution from the 10th to the 99th percentile; single-image (batch-1) forwards dominate that workload. 15376 is the most frequent forward, 35344 the FLOPs-median.

Results (GB300, cuDNN backend 9.25.0, FE 1.27.0)

S bf16 fp8
8836 1224 TF 1537 TF
15376 1247 TF 1639 TF
24336 1249 TF 1694 TF
35344 1245 TF 1738 TF
47376 1246 TF 1718 TF
62500 1264 TF 1675 TF

fp8 is a consistent ~1.35x over bf16 across the whole range.

flash_attention_4 rows are recorded as failed in the CSV: the released fa4 4.0.0b3 wheel's SM100 forward asserts Only SM 10.x and 11.x are supported on this part (sm103 missing from its arch table). Can be revisited when a newer fa4 wheel lands.

Testing

  • runner --config qwen3vl_vit --dry-run expands to the expected 18 cases.
  • Full run on GB300 (NGC pytorch:26.03 + latest FE/backend wheels): 12/12 cuDNN cases pass; CSV + qwen3vl_vit_no_mask.png generated by the suite's chart path.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a benchmark configuration for the Qwen3-VL vision encoder, including production-derived sequence lengths and supported attention backends.
    • Added benchmarking support for bfloat16 and FP8 data types with forward-only profiling.
  • Documentation

    • Added instructions for running the Qwen3-VL vision-encoder benchmark.

New sdpa_benchmark_training config for the Qwen3-VL vision tower's
self-attention as exercised by image/video inference: 16 MHA heads,
head_dim 72 zero-padded to 80 (fp8 16B-alignment contract), bidirectional
(no_mask), forward-only, batch 1.

The six sequence lengths are real per-image patch-grid token counts from
a production inference trace (94^2 .. 250^2), spanning that trace's
per-forward FLOPs distribution from the 10th to the 99th percentile;
single-image forwards dominate the workload.

GB300 results (cuDNN backend 9.25, FE 1.27): bf16 ~1250 TFLOPS and fp8
~1700 TFLOPS across the full range. flash_attention_4 rows are recorded
as failed: the released fa4 4.0.0b3 wheel's SM100 path asserts on this
part ("Only SM 10.x and 11.x are supported").

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vedaanta vedaanta added cat-feature Requests for new functionality, APIs, examples, or behavior improvements. mod-frontend cuDNN frontend APIs, operation graph construction, plans, and user-facing wrappers. orig-nv-eng Reported or requested by NVIDIA engineering. labels Aug 14, 2026
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ee29db60-bcc1-458b-9440-b47f81cc6b26

📥 Commits

Reviewing files that changed from the base of the PR and between 8a3b867 and d6de843.

⛔ Files ignored due to path filters (2)
  • benchmark/sdpa_benchmark_training/results/qwen3vl_vit/gb300/qwen3vl_vit_20260814_193600.csv is excluded by !**/*.csv
  • benchmark/sdpa_benchmark_training/results/qwen3vl_vit/gb300/qwen3vl_vit_no_mask.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • benchmark/sdpa_benchmark_training/README.md
  • benchmark/sdpa_benchmark_training/configs/qwen3vl_vit.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • benchmark/sdpa_benchmark_training/configs/qwen3vl_vit.py
  • benchmark/sdpa_benchmark_training/README.md

📝 Walkthrough

Walkthrough

Added a Qwen3-VL vision-encoder SDPA benchmark configuration with production-derived settings, supported execution backends and data types, and README usage documentation.

Changes

Qwen3-VL ViT benchmark

Layer / File(s) Summary
Qwen3-VL ViT preset and usage
benchmark/sdpa_benchmark_training/configs/qwen3vl_vit.py, benchmark/sdpa_benchmark_training/README.md
Added the QWEN3VL_VIT and CONFIG definitions. The preset uses 16 query/KV heads, an 80-dimensional head, six sequence lengths, cuDNN and FlashAttention 4, bfloat16 and FP8, unmasked forward-only profiling, batch size 1, and configured warmup and iteration counts. The README lists the configuration and its runner command.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d6de8

This change adds a localized benchmark configuration and GB300 results without evidence of a merge-blocking correctness, runtime, deployment, or availability risk; it is merge-ready after normal checks and review.

Suggested labels: mod-frost

Suggested reviewers: brandonfzhang

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the benchmark configuration, results, limitations, and testing, but omits several template sections and checklist items. Add the required checklist, affected area, explicit Why, Related issues, and API and compatibility impact sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the added Qwen3-VL ViT SDPA configuration and associated GB300 benchmark results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@vedaanta
vedaanta requested a review from brandonfzhang August 14, 2026 20:21
…300 results

- backends += cudnn_oss (merged in NVIDIA#597), matching the other configs.
- FA4 now runs on GB300 via the pre-release flash-attn-4[cu13] wheel
  (the fa4 4.0.0b3 wheel asserted sm103 unsupported); bf16 lands
  1423-1504 TFLOPS, ~18% ahead of the cudnn bf16 rows.
- cudnn_oss rows are recorded unsupported: no FROST OSS engine serves a
  bare-dense fwd graph whose S_kv is not a multiple of 128 (unmasked-tail
  rule), and ViT patch-grid lengths never are. Engine-side dense tail
  handling is the follow-up that would light these rows up.
- Results regenerated in one session with FE built from develop tip
  (python tree and pybind module must match: VariantPackNative skew).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vedaanta

Copy link
Copy Markdown
Collaborator Author

Refreshed after #597 merged (thanks @brandon): backends now cudnn / cudnn_oss / flash_attention_4, GB300 results regenerated in one session (FE built from develop tip, backend 9.25).

S cudnn BF16 FAv4 BF16 cudnn FP8
8836 1215 1457 1547
15376 1241 1492 1629
24336 1245 1476 1707
35344 1241 1491 1721
47376 1253 1504 1709
62500 1269 1423 1648
  • FA4 works on GB300 via pip install --pre "flash-attn-4[cu13]" — the released fa4 4.0.0b3 wheel asserts sm103 unsupported, the pre-release wheel does not. FAv4 BF16 runs ~18% ahead of the cudnn BF16 rows on these shapes; cudnn FP8 tops all series.
  • cudnn_oss rows are recorded unsupported (exit-42 path): no FROST OSS engine serves a bare-dense fwd graph whose S_kv isn't a multiple of 128 (unmasked-tail rule), and ViT patch-grid lengths (94², 124², …) never are. Engine-side dense tail handling would light these rows up — noting it as the concrete follow-up this workload motivates.

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

Labels

cat-feature Requests for new functionality, APIs, examples, or behavior improvements. mod-frontend cuDNN frontend APIs, operation graph construction, plans, and user-facing wrappers. orig-nv-eng Reported or requested by NVIDIA engineering.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants