diff --git a/test/registered/attention/unittests/dense/test_torch_native.py b/test/registered/attention/unittests/dense/test_torch_native.py index d07198e92..6cd66c8bb 100644 --- a/test/registered/attention/unittests/dense/test_torch_native.py +++ b/test/registered/attention/unittests/dense/test_torch_native.py @@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.dense_attention import ( DenseAttentionCase, make_dense_cases, @@ -18,6 +18,7 @@ from sglang.test.kits.attention_unittest.attention_methods.dense_attention impor register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") diff --git a/test/registered/attention/unittests/dense/test_triton.py b/test/registered/attention/unittests/dense/test_triton.py index 1d438c399..82b0aaeb9 100644 --- a/test/registered/attention/unittests/dense/test_triton.py +++ b/test/registered/attention/unittests/dense/test_triton.py @@ -5,11 +5,12 @@ from pathlib import Path import torch from sglang.srt.model_executor.forward_batch_info import ForwardMode +from sglang.srt.utils import is_hip from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.dense_attention import ( DenseAttentionCase, make_dense_cases, @@ -36,6 +37,7 @@ from sglang.test.kits.attention_unittest.runner_modes.split_op_runner import ( register_cuda_ci(est_time=25, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=25, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=25, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") @@ -366,6 +368,11 @@ class TestTritonDenseAttentionBackendCorrectness(CustomTestCase): with self.subTest(case=case.name, backend=case.backend): run_dense_cuda_graph_decode_case(self, case) + @unittest.skipIf( + is_hip(), + "split-op extend runner exercises the piecewise-CUDA-graph path " + "(TcPiecewiseForwardContext.num_tokens), which is not wired on ROCm.", + ) def test_runner_mode_split_op_extend_cases(self): for case, static_num_tokens in self.SPLIT_OP_CASES: for breakable in (False, True): diff --git a/test/registered/attention/unittests/gdn/test_torch_native.py b/test/registered/attention/unittests/gdn/test_torch_native.py index cb02941df..3496fe1df 100644 --- a/test/registered/attention/unittests/gdn/test_torch_native.py +++ b/test/registered/attention/unittests/gdn/test_torch_native.py @@ -5,11 +5,12 @@ from pathlib import Path import torch from sglang.srt.model_executor.forward_batch_info import ForwardMode +from sglang.srt.utils import is_hip from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.gdn_attention import ( GDNAttentionCase, make_gdn_cases, @@ -21,6 +22,7 @@ from sglang.test.kits.attention_unittest.runner_modes.split_op_runner import ( register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") @@ -78,6 +80,11 @@ class TestTorchNativeGDNBackendCorrectness(CustomTestCase): with self.subTest(case=case.name, layout=layout): run_gdn_attention_case(self, case, loc_layout=layout) + @unittest.skipIf( + is_hip(), + "split-op extend runner exercises the piecewise-CUDA-graph path " + "(TcPiecewiseForwardContext.num_tokens), which is not wired on ROCm.", + ) def test_runner_mode_split_op_extend_cases(self): for case, static_num_tokens in self.SPLIT_OP_CASES: for breakable in (False, True): diff --git a/test/registered/attention/unittests/gdn/test_triton.py b/test/registered/attention/unittests/gdn/test_triton.py index d20a62864..9b988101e 100644 --- a/test/registered/attention/unittests/gdn/test_triton.py +++ b/test/registered/attention/unittests/gdn/test_triton.py @@ -11,11 +11,12 @@ from sglang.srt.layers.attention.hybrid_linear_attn_backend import ( MambaAttnBackendBase, ) from sglang.srt.model_executor.forward_batch_info import ForwardMode +from sglang.srt.utils import is_hip from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.gdn_attention import ( GDNAttentionCase, make_gdn_cases, @@ -37,6 +38,7 @@ from sglang.test.kits.attention_unittest.runner_modes.split_op_runner import ( register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") @@ -261,6 +263,11 @@ class TestTritonGDNBackendCorrectness(CustomTestCase): with self.subTest(case=case.name, backend=case.backend): run_gdn_cuda_graph_decode_case(self, case) + @unittest.skipIf( + is_hip(), + "split-op extend runner exercises the piecewise-CUDA-graph path " + "(TcPiecewiseForwardContext.num_tokens), which is not wired on ROCm.", + ) def test_runner_mode_split_op_extend_cases(self): for case, static_num_tokens in self.SPLIT_OP_CASES: for breakable in (False, True): diff --git a/test/registered/attention/unittests/kda/test_triton.py b/test/registered/attention/unittests/kda/test_triton.py index 4075acb0a..bc6280aa4 100644 --- a/test/registered/attention/unittests/kda/test_triton.py +++ b/test/registered/attention/unittests/kda/test_triton.py @@ -5,11 +5,12 @@ from pathlib import Path import torch from sglang.srt.model_executor.forward_batch_info import ForwardMode +from sglang.srt.utils import is_hip from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.kda_attention import ( KDAAttentionCase, make_kda_cases, @@ -31,6 +32,7 @@ from sglang.test.kits.attention_unittest.runner_modes.split_op_runner import ( register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") @@ -276,6 +278,11 @@ class TestTritonKDABackendCorrectness(CustomTestCase): ): run_kda_eagle_draft_extend_case(self, case, spec_kind=spec_kind) + @unittest.skipIf( + is_hip(), + "split-op extend runner exercises the piecewise-CUDA-graph path " + "(TcPiecewiseForwardContext.num_tokens), which is not wired on ROCm.", + ) def test_runner_mode_split_op_extend_cases(self): for case, static_num_tokens in self.SPLIT_OP_CASES: for breakable in (False, True): diff --git a/test/registered/attention/unittests/lightning/test_triton.py b/test/registered/attention/unittests/lightning/test_triton.py index ac6dfb916..e568eca95 100644 --- a/test/registered/attention/unittests/lightning/test_triton.py +++ b/test/registered/attention/unittests/lightning/test_triton.py @@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.lightning_attention import ( LightningAttentionCase, make_lightning_cases, @@ -28,6 +28,7 @@ from sglang.test.kits.attention_unittest.runner_modes.speculative_target_verify_ register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") diff --git a/test/registered/attention/unittests/swa/test_torch_native.py b/test/registered/attention/unittests/swa/test_torch_native.py index f22913486..de4c4e04b 100644 --- a/test/registered/attention/unittests/swa/test_torch_native.py +++ b/test/registered/attention/unittests/swa/test_torch_native.py @@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.dense_attention import ( DenseAttentionCase, make_swa_no_prefix_input_config_cases, @@ -19,6 +19,7 @@ from sglang.test.kits.attention_unittest.attention_methods.dense_attention impor register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") diff --git a/test/registered/attention/unittests/swa/test_triton.py b/test/registered/attention/unittests/swa/test_triton.py index a07de43e7..2ce9ddac8 100644 --- a/test/registered/attention/unittests/swa/test_triton.py +++ b/test/registered/attention/unittests/swa/test_triton.py @@ -5,11 +5,12 @@ from pathlib import Path import torch from sglang.srt.model_executor.forward_batch_info import ForwardMode +from sglang.srt.utils import is_hip from sglang.test.test_utils import CustomTestCase sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.kits.attention_unittest.attention_methods.dense_attention import ( DenseAttentionCase, make_swa_no_prefix_input_config_cases, @@ -29,6 +30,7 @@ from sglang.test.kits.attention_unittest.runner_modes.split_op_runner import ( register_cuda_ci(est_time=20, stage="base-b", runner_config="4-gpu-b200") register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large") +register_amd_ci(est_time=20, suite="stage-b-test-1-gpu-large-amd") @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") @@ -297,6 +299,11 @@ class TestTritonSWAAttentionBackendCorrectness(CustomTestCase): with self.subTest(case=case.name, backend=case.backend): run_dense_cuda_graph_decode_case(self, case) + @unittest.skipIf( + is_hip(), + "split-op extend runner exercises the piecewise-CUDA-graph path " + "(TcPiecewiseForwardContext.num_tokens), which is not wired on ROCm.", + ) def test_runner_mode_split_op_extend_cases(self): for case, static_num_tokens in self.SPLIT_OP_CASES: for breakable in (False, True):