[Perf][Kernel][Quantization] Fuse ReLU2 with static FP8 activation quantization (#53793)

Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: ElizaWszola <ewszola@redhat.com>
Signed-off-by: snordmann <snordmann@nvidia.com>
Co-authored-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: ElizaWszola <ewszola@redhat.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Samuel Nordmann
2026-09-14 10:26:15 -07:00
committed by GitHub
co-authored by mgoin Claude Opus 4.8 ElizaWszola OpenAI Codex mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 435c96f9db
commit 03dc26e639
12 changed files with 459 additions and 32 deletions
@@ -42,6 +42,7 @@ from vllm.model_executor.layers.fusion.quant_activation import (
QuantizedActivation,
as_quantized_activation,
expose_input_quant_key,
get_input_quant_key,
)
from vllm.model_executor.layers.quantization.utils.quant_utils import (
kFp8StaticTensorSym,
@@ -118,13 +119,13 @@ def test_bridge_marks_supporting_and_skips_others():
supported = _probe(FlashInferCutlassNvFp4LinearKernel)
layer = torch.nn.Module()
expose_input_quant_key(layer, supported)
assert layer.input_quant_key == kNvfp4Dynamic
assert get_input_quant_key(layer) == kNvfp4Dynamic
unsupported = _probe(FlashInferTrtllmNvFp4LinearKernel)
assert unsupported.input_quant_key() is None
layer = torch.nn.Module()
expose_input_quant_key(layer, unsupported)
assert not hasattr(layer, "input_quant_key")
assert get_input_quant_key(layer) is None
def test_as_quantized_activation_validates_key():