[CI] Fix stale GPU capability test patches (#37148)
This commit is contained in:
@@ -444,8 +444,8 @@ class TestDSV4BreakableCudaGraphMetadataContract(CustomTestCase):
|
|||||||
envs.SGLANG_ENABLE_PREFILL_WAR_READ_DONE.override(True),
|
envs.SGLANG_ENABLE_PREFILL_WAR_READ_DONE.override(True),
|
||||||
envs.SGLANG_OPT_FLASHMLA_SPARSE_PREFILL.override(False),
|
envs.SGLANG_OPT_FLASHMLA_SPARSE_PREFILL.override(False),
|
||||||
mock.patch(
|
mock.patch(
|
||||||
"sglang.srt.layers.attention.deepseek_v4_backend._is_sm120",
|
"sglang.srt.layers.attention.deepseek_v4_backend.get_platform",
|
||||||
False,
|
return_value=SimpleNamespace(is_sm120=False),
|
||||||
),
|
),
|
||||||
):
|
):
|
||||||
backend.prepare_prefill_shared_read_snapshot(
|
backend.prepare_prefill_shared_read_snapshot(
|
||||||
@@ -490,7 +490,8 @@ class TestDSV4BreakableCudaGraphMetadataContract(CustomTestCase):
|
|||||||
envs.SGLANG_ENABLE_PREFILL_WAR_READ_DONE.override(True),
|
envs.SGLANG_ENABLE_PREFILL_WAR_READ_DONE.override(True),
|
||||||
envs.SGLANG_OPT_FLASHMLA_SPARSE_PREFILL.override(True),
|
envs.SGLANG_OPT_FLASHMLA_SPARSE_PREFILL.override(True),
|
||||||
mock.patch(
|
mock.patch(
|
||||||
"sglang.srt.layers.attention.deepseek_v4_backend._is_sm120", False
|
"sglang.srt.layers.attention.deepseek_v4_backend.get_platform",
|
||||||
|
return_value=SimpleNamespace(is_sm120=False),
|
||||||
),
|
),
|
||||||
self.assertRaisesRegex(RuntimeError, "snapshot failed"),
|
self.assertRaisesRegex(RuntimeError, "snapshot failed"),
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ class TestApplyFp8LinearScaleDispatch(CustomTestCase):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
for capability in (
|
for capability in (
|
||||||
"_is_sm90_supported",
|
"is_sm90",
|
||||||
"_is_sm100_supported",
|
"is_sm100",
|
||||||
"_is_sm120_supported",
|
"is_sm120",
|
||||||
):
|
):
|
||||||
with self.subTest(capability=capability):
|
with self.subTest(capability=capability):
|
||||||
input, qinput, weight, input_scale, weight_scale = self._make_inputs()
|
input, qinput, weight, input_scale, weight_scale = self._make_inputs()
|
||||||
@@ -92,14 +92,20 @@ class TestApplyFp8LinearScaleDispatch(CustomTestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
capabilities = {
|
capabilities = {
|
||||||
"_is_sm90_supported": False,
|
"is_sm90": False,
|
||||||
"_is_sm100_supported": False,
|
"is_sm100": False,
|
||||||
"_is_sm120_supported": False,
|
"is_sm120": False,
|
||||||
}
|
}
|
||||||
capabilities[capability] = True
|
capabilities[capability] = True
|
||||||
with patch.multiple(fp8_utils, **capabilities), patch.object(
|
with patch.object(
|
||||||
|
fp8_utils,
|
||||||
|
"get_platform",
|
||||||
|
return_value=SimpleNamespace(**capabilities),
|
||||||
|
), patch.object(
|
||||||
fp8_utils, "fp8_scaled_mm", side_effect=fake_fp8_scaled_mm
|
fp8_utils, "fp8_scaled_mm", side_effect=fake_fp8_scaled_mm
|
||||||
), patch.object(fp8_utils, "get_exec", return_value=exec_config):
|
), patch.object(
|
||||||
|
fp8_utils, "get_exec", return_value=exec_config
|
||||||
|
):
|
||||||
fp8_utils.apply_fp8_linear(
|
fp8_utils.apply_fp8_linear(
|
||||||
input,
|
input,
|
||||||
weight,
|
weight,
|
||||||
@@ -151,11 +157,14 @@ class TestApplyFp8LinearScaleDispatch(CustomTestCase):
|
|||||||
(mat_a.shape[0], mat_b.shape[1]), dtype=out_dtype, device=mat_a.device
|
(mat_a.shape[0], mat_b.shape[1]), dtype=out_dtype, device=mat_a.device
|
||||||
)
|
)
|
||||||
|
|
||||||
with patch.multiple(
|
with patch.object(
|
||||||
fp8_utils,
|
fp8_utils,
|
||||||
_is_sm90_supported=False,
|
"get_platform",
|
||||||
_is_sm100_supported=False,
|
return_value=SimpleNamespace(
|
||||||
_is_sm120_supported=False,
|
is_sm90=False,
|
||||||
|
is_sm100=False,
|
||||||
|
is_sm120=False,
|
||||||
|
),
|
||||||
), patch.object(fp8_utils, "fp8_scaled_mm", side_effect=fake_fp8_scaled_mm):
|
), patch.object(fp8_utils, "fp8_scaled_mm", side_effect=fake_fp8_scaled_mm):
|
||||||
fp8_utils.apply_fp8_linear(
|
fp8_utils.apply_fp8_linear(
|
||||||
input,
|
input,
|
||||||
|
|||||||
Reference in New Issue
Block a user