Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/quantization/test_nvfp4_nf3_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from vllm.model_executor.layers.quantization import get_quantization_config
from vllm.model_executor.layers.quantization.nvfp4_nf3_hybrid import (
NvFp4Nf3HybridConfig,
NvFp4Nf3HybridMoEMethod,
_combined_tier_local_descriptors,
_read_hybrid_keys,
_unpack_nf3_codes,
Expand Down Expand Up @@ -109,3 +110,10 @@ def test_grid188_tier_descriptors_encode_exact_partition():
def test_grid188_tier_descriptors_reject_incomplete_partition():
with pytest.raises(ValueError, match="does not cover all 256"):
_combined_tier_local_descriptors({0: (0, 0)})


@pytest.mark.parametrize("num_tokens", [1, 8, 256, 3072])
def test_hybrid_moe_rejects_shared_expert_aux_stream(num_tokens):
method = object.__new__(NvFp4Nf3HybridMoEMethod)

assert not method.supports_shared_experts_aux_stream(num_tokens)
10 changes: 10 additions & 0 deletions vllm/model_executor/layers/quantization/nvfp4_nf3_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ def __init__(
super().__init__(moe_config)
self.quant_config = quant_config

def supports_shared_experts_aux_stream(self, num_tokens: int) -> bool:
"""The hybrid B12X launches must own the device while they run.

Both the unified Grid188 decode and the per-tier fused fallback use
resident-grid software barriers. Concurrent shared-expert work can
occupy an SM needed by a barrier participant and deadlock the grid;
the resulting asynchronous fault may surface in a later CUDA op.
"""
return False

def maybe_make_prepare_finalize(
self,
routing_tables: tuple[torch.Tensor, torch.Tensor, torch.Tensor] | None = None,
Expand Down