[AMD] ci: register 8 attention-backend unit tests to run on AMD CI (#27817)
This commit is contained in:
@@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase
|
|||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.dense_attention import (
|
||||||
DenseAttentionCase,
|
DenseAttentionCase,
|
||||||
make_dense_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@unittest.skipIf(not torch.cuda.is_available(), "CUDA is required")
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ from pathlib import Path
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
||||||
|
from sglang.srt.utils import is_hip
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.dense_attention import (
|
||||||
DenseAttentionCase,
|
DenseAttentionCase,
|
||||||
make_dense_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=25, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@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):
|
with self.subTest(case=case.name, backend=case.backend):
|
||||||
run_dense_cuda_graph_decode_case(self, case)
|
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):
|
def test_runner_mode_split_op_extend_cases(self):
|
||||||
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
||||||
for breakable in (False, True):
|
for breakable in (False, True):
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ from pathlib import Path
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
||||||
|
from sglang.srt.utils import is_hip
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.gdn_attention import (
|
||||||
GDNAttentionCase,
|
GDNAttentionCase,
|
||||||
make_gdn_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@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):
|
with self.subTest(case=case.name, layout=layout):
|
||||||
run_gdn_attention_case(self, case, loc_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):
|
def test_runner_mode_split_op_extend_cases(self):
|
||||||
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
||||||
for breakable in (False, True):
|
for breakable in (False, True):
|
||||||
|
|||||||
@@ -11,11 +11,12 @@ from sglang.srt.layers.attention.hybrid_linear_attn_backend import (
|
|||||||
MambaAttnBackendBase,
|
MambaAttnBackendBase,
|
||||||
)
|
)
|
||||||
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
||||||
|
from sglang.srt.utils import is_hip
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.gdn_attention import (
|
||||||
GDNAttentionCase,
|
GDNAttentionCase,
|
||||||
make_gdn_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@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):
|
with self.subTest(case=case.name, backend=case.backend):
|
||||||
run_gdn_cuda_graph_decode_case(self, case)
|
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):
|
def test_runner_mode_split_op_extend_cases(self):
|
||||||
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
||||||
for breakable in (False, True):
|
for breakable in (False, True):
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ from pathlib import Path
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
||||||
|
from sglang.srt.utils import is_hip
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.kda_attention import (
|
||||||
KDAAttentionCase,
|
KDAAttentionCase,
|
||||||
make_kda_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@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)
|
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):
|
def test_runner_mode_split_op_extend_cases(self):
|
||||||
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
||||||
for breakable in (False, True):
|
for breakable in (False, True):
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase
|
|||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.lightning_attention import (
|
||||||
LightningAttentionCase,
|
LightningAttentionCase,
|
||||||
make_lightning_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@unittest.skipIf(not torch.cuda.is_available(), "CUDA is required")
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from sglang.test.test_utils import CustomTestCase
|
|||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.dense_attention import (
|
||||||
DenseAttentionCase,
|
DenseAttentionCase,
|
||||||
make_swa_no_prefix_input_config_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@unittest.skipIf(not torch.cuda.is_available(), "CUDA is required")
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ from pathlib import Path
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
from sglang.srt.model_executor.forward_batch_info import ForwardMode
|
||||||
|
from sglang.srt.utils import is_hip
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
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 (
|
from sglang.test.kits.attention_unittest.attention_methods.dense_attention import (
|
||||||
DenseAttentionCase,
|
DenseAttentionCase,
|
||||||
make_swa_no_prefix_input_config_cases,
|
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="4-gpu-b200")
|
||||||
register_cuda_ci(est_time=20, stage="base-b", runner_config="1-gpu-large")
|
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")
|
@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):
|
with self.subTest(case=case.name, backend=case.backend):
|
||||||
run_dense_cuda_graph_decode_case(self, case)
|
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):
|
def test_runner_mode_split_op_extend_cases(self):
|
||||||
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
for case, static_num_tokens in self.SPLIT_OP_CASES:
|
||||||
for breakable in (False, True):
|
for breakable in (False, True):
|
||||||
|
|||||||
Reference in New Issue
Block a user