---
id: pr-vllm-34389
repo: vllm-project/vllm
pr: 34389
title: '[Custom Ops] Add functional + out variant for scaled_fp4_quant'
author: tianrengao
date: '2026-03-16'
url: https://github.com/vllm-project/vllm/pull/34389
source_category: upstream-code
architectures:
- sm100
tags:
- fp4
- gemm_quant
techniques:
- fine-grained-quantization
- kernel-fusion
- swizzling
hardware_features:
- fp4
- nvfp4
kernel_types:
- gemm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 3e6a1e1686958dcd7eff1438bc5418b8d56daa30
inclusion_reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.
changed_paths:
- csrc/ops.h
- csrc/quantization/fp4/nvfp4_quant_entry.cu
- csrc/quantization/fp4/nvfp4_utils.cuh
- csrc/torch_bindings.cpp
- tests/compile/passes/distributed/test_fusion_all_reduce.py
- tests/kernels/quantization/test_nvfp4_quant.py
- vllm/_custom_ops.py
- vllm/compilation/passes/fusion/act_quant_fusion.py
- vllm/compilation/passes/fusion/allreduce_rms_fusion.py
- vllm/compilation/passes/fusion/attn_quant_fusion.py
- vllm/compilation/passes/fusion/matcher_utils.py
- vllm/compilation/passes/fusion/rms_quant_fusion.py
artifact_dir: evidence/pull-bundles/vllm/gh-34389
head_ref_oid: 7a359e94b1a2d894cfd9f8122e187b6a4e5ffb09
---
# [Custom Ops] Add functional + out variant for scaled_fp4_quant

- Repository: `vllm-project/vllm`
- PR: [34389](https://github.com/vllm-project/vllm/pull/34389)
- Decision: `Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.`
- Reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.

## Changed Paths

- `csrc/ops.h`
- `csrc/quantization/fp4/nvfp4_quant_entry.cu`
- `csrc/quantization/fp4/nvfp4_utils.cuh`
- `csrc/torch_bindings.cpp`
- `tests/compile/passes/distributed/test_fusion_all_reduce.py`
- `tests/kernels/quantization/test_nvfp4_quant.py`
- `vllm/_custom_ops.py`
- `vllm/compilation/passes/fusion/act_quant_fusion.py`
- `vllm/compilation/passes/fusion/allreduce_rms_fusion.py`
- `vllm/compilation/passes/fusion/attn_quant_fusion.py`
- `vllm/compilation/passes/fusion/matcher_utils.py`
- `vllm/compilation/passes/fusion/rms_quant_fusion.py`

## Evidence Bundle

`evidence/pull-bundles/vllm/gh-34389`
