Skip to content

[NVBug 6938144] Qualify the extension fallback in the vLLM example docs - #3068

Draft
shengliangxu wants to merge 1 commit into
mainfrom
shengliangx/nvbug-6938144-docs
Draft

shengliangxu wants to merge 1 commit into
mainfrom
shengliangx/nvbug-6938144-docs

Conversation

@shengliangxu

@shengliangxu shengliangxu commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: documentation

Follow-up to #2997 (merged), which stopped making /workspace world-writable in the vLLM serve example image. Two review comments arrived as it merged:

  • The README and the 0.48.0 changelog entry said that without a writable TORCH_EXTENSIONS_DIR ModelOpt "falls back to slower eager fake quantization". That holds for quantizers with an eager implementation, such as FP8 (get_cuda_ext_fp8(raise_if_failed=False) falls back to fp8_eager). It does not hold for NVFP4 on GPUs below compute capability 8.9, such as A100: there _dynamic_block_quantize_impl has no Triton kernel and calls get_cuda_ext_mx(raise_if_failed=True), and nothing in TensorQuantizer._fake_quantize catches the RuntimeError, so serving fails instead of running slower. Both texts now say so.
  • A reviewer asked whether ext_cache has to be cleaned up. The README now says that it only holds the built extensions and can be kept or deleted at any time.

Usage

No code change.

Testing

Check Result
pre-commit (rst, markdown, license, whitespace hooks) pass
The README and changelog claims against the code (tensor_quant.py, extensions.py, TensorQuantizer._fake_quantize) read; they match
NVFP4 on an A100 without a writable extension directory not run: documentation only, the failure follows from the code path above

Before your PR is "Ready for review"

Make sure you read and follow Contributor guidelines and your commits are signed (git commit -s -S).

Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded trust_remote_code=True, torch.load(..., weights_only=False), pickle, etc.).

Additional Information

NVBug 6938144. Targets the 0.48.0 release: it edits the changelog entry that #2997 adds, so on release/0.48.0 cherry-pick #2997's commit first and then this one.

Summary by CodeRabbit

  • Documentation
    • Clarified that CUDA extensions are built on first use and require a writable cache directory when running the Docker image as a different user.
    • Explained that quantizers with eager implementations may run more slowly when extensions cannot be built, while quantizers without eager implementations may fail on unsupported GPUs.
    • Clarified that the extension cache can be kept to avoid rebuilding or deleted at any time.

Without a writable TORCH_EXTENSIONS_DIR only the quantizers with an eager implementation, such as
FP8, warn and fall back. NVFP4 on GPUs below compute capability 8.9 has no Triton kernel and calls
get_cuda_ext_mx(raise_if_failed=True), so it raises instead of running slower. Say so in the README
and the changelog entry, and note that the extension cache directory can be kept or deleted.

Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 90f560d and 45f6654.

Files selected for processing: 2
  • CHANGELOG.rst
  • examples/vllm_serve/README.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

Walkthrough

The README and changelog clarify where ModelOpt builds CUDA extensions, what happens when the build directory is not writable, and how users can retain or delete the extension cache.

Changes: Extension build and cache guidance

Layer / File(s) Summary
Build and cache behavior
examples/vllm_serve/README.md, CHANGELOG.rst
The documentation explains that quantizers with eager implementations warn and fall back to slower fake quantization when extensions cannot be built. Quantizers without eager implementations fail. It also states that ext_cache contains built extensions and can be retained or deleted.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Suggested reviewers: sugunav14

Merge Risk: Minimal · up to 45f66

This documentation-only change is ready to merge; its documented fallback and failure behavior is consistent with the implementation.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main documentation change: clarifying extension fallback behavior in the vLLM example. It is concise and related to the changeset.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
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.
Security Anti-Patterns Passed PASS: The pull request changes only CHANGELOG.rst and examples/vllm_serve/README.md. It adds no Python changes, dependency changes, or security-sensitive code patterns covered by this check.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@shengliangxu

Copy link
Copy Markdown
Collaborator Author

/ok to test 45f6654

@shengliangxu

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.95%. Comparing base (90f560d) to head (45f6654).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3068   +/-   ##
=======================================
  Coverage   79.95%   79.95%           
=======================================
  Files         661      661           
  Lines       75663    75663           
=======================================
  Hits        60497    60497           
  Misses      15166    15166           
Flag Coverage Δ
unit 61.49% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant