[CI] Collapse the EAGLE launch matrix and the scoring engine boots on the per-commit runners (#33756)
This commit is contained in:
@@ -16,7 +16,7 @@ from sglang.multimodal_gen.runtime.models.parameter import (
|
||||
PerTensorScaleParameter,
|
||||
)
|
||||
from sglang.srt.layers.quantization.utils import is_layer_skipped
|
||||
from sglang.srt.utils import is_hip, mxfp_supported
|
||||
from sglang.srt.utils import is_gfx95_supported, is_hip
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
_is_hip = is_hip()
|
||||
@@ -70,7 +70,7 @@ class Mxfp4Config(QuantizationConfig):
|
||||
|
||||
@classmethod
|
||||
def get_min_capability(cls) -> int:
|
||||
return 95 # gfx95x, Note: mxfp_supported() is a better check
|
||||
return 95 # gfx95x, Note: is_gfx95_supported() is a better check
|
||||
|
||||
@classmethod
|
||||
def get_config_filenames(cls) -> list[str]:
|
||||
@@ -165,7 +165,7 @@ class Mxfp4LinearMethod(LinearMethodBase):
|
||||
- Packed uint8 (2 FP4 values per byte)
|
||||
- E8M0 scales (one per 32-element block)
|
||||
"""
|
||||
if not mxfp_supported():
|
||||
if not is_gfx95_supported():
|
||||
platform = "unknown"
|
||||
if _is_hip:
|
||||
try:
|
||||
@@ -217,7 +217,7 @@ class Mxfp4LinearMethod(LinearMethodBase):
|
||||
bias: Optional[torch.Tensor] = None,
|
||||
) -> torch.Tensor:
|
||||
|
||||
if not mxfp_supported():
|
||||
if not is_gfx95_supported():
|
||||
raise RuntimeError(
|
||||
"MXFP4 inference requires ROCm and MI350+ (gfx95x). "
|
||||
"Current platform not supported."
|
||||
|
||||
@@ -58,13 +58,12 @@ from sglang.srt.utils import (
|
||||
cpu_has_amx_support,
|
||||
is_cpu,
|
||||
is_cuda,
|
||||
is_hip,
|
||||
is_gfx95_supported,
|
||||
is_mps,
|
||||
is_npu,
|
||||
mxfp_supported,
|
||||
)
|
||||
|
||||
_is_mxfp_supported = mxfp_supported()
|
||||
_is_gfx95_supported = is_gfx95_supported()
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sglang.srt.layers.moe.topk import TopKOutput
|
||||
@@ -102,7 +101,7 @@ BASE_QUANTIZATION_METHODS: Dict[str, Type[QuantizationConfig]] = {
|
||||
}
|
||||
|
||||
|
||||
if is_cpu() or is_cuda() or (_is_mxfp_supported and is_hip()):
|
||||
if is_cpu() or is_cuda() or _is_gfx95_supported:
|
||||
BASE_QUANTIZATION_METHODS.update(
|
||||
{
|
||||
"mxfp4": Mxfp4Config,
|
||||
|
||||
@@ -59,7 +59,6 @@ from sglang.srt.utils import (
|
||||
is_sm100_supported,
|
||||
is_sm120_supported,
|
||||
is_triton_kernels_available,
|
||||
mxfp_supported,
|
||||
next_power_of_2,
|
||||
round_up,
|
||||
set_weight_attrs,
|
||||
@@ -256,7 +255,7 @@ class Mxfp4Config(QuantizationConfig):
|
||||
is_checkpoint_mxfp4_serialized = "mxfp4" in quant_method
|
||||
|
||||
if _is_hip:
|
||||
if mxfp_supported():
|
||||
if is_gfx95_supported():
|
||||
return cls(
|
||||
is_checkpoint_mxfp4_serialized=is_checkpoint_mxfp4_serialized
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ from sglang.srt.layers.quantization.fp8 import Fp8Config, Fp8LinearMethod
|
||||
from sglang.srt.layers.quantization.online_quantization import CopyNumelCounter
|
||||
from sglang.srt.layers.quantization.quark.schemes import QuarkLinearScheme
|
||||
from sglang.srt.utils import is_hip
|
||||
from sglang.srt.utils.common import direct_register_custom_op, mxfp_supported
|
||||
from sglang.srt.utils.common import direct_register_custom_op, is_gfx95_supported
|
||||
|
||||
_is_hip = is_hip()
|
||||
if _is_hip:
|
||||
@@ -180,7 +180,7 @@ class QuarkW4A4MXFP4(QuarkLinearScheme):
|
||||
self.dequantization_config = dequantization_config
|
||||
|
||||
if not self.is_checkpoint_mxfp4_serialized:
|
||||
if not mxfp_supported():
|
||||
if not is_gfx95_supported():
|
||||
raise NotImplementedError(
|
||||
"Online MXFP4 quantization requires an AMD ROCm device with "
|
||||
"FP4 hardware support (gfx95x, e.g. MI355x)."
|
||||
|
||||
@@ -24,7 +24,7 @@ from sglang.srt.utils import (
|
||||
is_hip,
|
||||
set_weight_attrs,
|
||||
)
|
||||
from sglang.srt.utils.common import mxfp_supported
|
||||
from sglang.srt.utils.common import is_gfx95_supported
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sglang.srt.layers.moe.token_dispatcher import (
|
||||
@@ -79,7 +79,7 @@ class QuarkW4A4MXFp4MoE(QuarkMoEScheme):
|
||||
self.with_bias = False
|
||||
|
||||
if not self.is_checkpoint_mxfp4_serialized:
|
||||
if not mxfp_supported():
|
||||
if not is_gfx95_supported():
|
||||
raise NotImplementedError(
|
||||
"Online MXFP4 quantization for MoE layers requires an AMD ROCm "
|
||||
"device with FP4 hardware support (gfx95x, e.g. MI355x)."
|
||||
|
||||
@@ -1023,21 +1023,11 @@ def set_cuda_arch():
|
||||
)
|
||||
|
||||
|
||||
def mxfp_supported():
|
||||
"""
|
||||
Returns whether the current platform supports MX types.
|
||||
"""
|
||||
if torch.version.hip:
|
||||
gcn_arch = torch.cuda.get_device_properties(0).gcnArchName
|
||||
return any(gfx in gcn_arch for gfx in ["gfx95"])
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def is_gfx95_supported():
|
||||
"""
|
||||
Returns whether the current platform supports MX types.
|
||||
"""Whether the device is an AMD gfx95 GPU (the MX-capable ROCm arch).
|
||||
|
||||
False on every non-HIP build, so callers do not need their own is_hip().
|
||||
"""
|
||||
if torch.version.hip:
|
||||
gcn_arch = torch.cuda.get_device_properties(0).gcnArchName
|
||||
|
||||
@@ -386,8 +386,8 @@ class SpecLogprobKit:
|
||||
with ThreadPoolExecutor(8) as executor:
|
||||
list(executor.map(func, args))
|
||||
|
||||
def test_logprob_spec_v2_match(self):
|
||||
"""Verify spec v2 decode logprobs match prefill scoring logprobs."""
|
||||
def test_logprob_decode_match_prefill(self):
|
||||
"""Decode logprobs from the spec path must match prefill scoring."""
|
||||
top_k = 5
|
||||
probe_token_ids = [1, 2, 10, 100, 1000]
|
||||
prompts = [
|
||||
|
||||
Reference in New Issue
Block a user