[Fix]: exclude SM120 from attn-res TMA dispatch (#35361)

Co-authored-by: 1BIN4 <1741738350@qq.com>
Co-authored-by: L-Ark <fliangae@connect.ust.hk>
Co-authored-by: Chikati <jxudn@connect.ust.hk>
Co-authored-by: mengzili <zilim@ust.hk>
This commit is contained in:
hujianmin
2026-08-20 14:32:31 +08:00
committed by GitHub
co-authored by 1BIN4 L-Ark Chikati mengzili
parent 628674a5c7
commit 0bda0b168a
2 changed files with 30 additions and 5 deletions
@@ -0,0 +1,20 @@
import unittest
from sglang.srt.layers.attn_residual import _supports_attn_res_tma
from sglang.test.ci.ci_register import register_cpu_ci
register_cpu_ci(est_time=5, suite="base-a-test-cpu")
class TestAttnResidual(unittest.TestCase):
def test_tma_capability_gate(self):
self.assertFalse(_supports_attn_res_tma((9, 0)))
self.assertTrue(_supports_attn_res_tma((10, 0)))
self.assertTrue(_supports_attn_res_tma((10, 3)))
self.assertTrue(_supports_attn_res_tma((11, 0)))
self.assertFalse(_supports_attn_res_tma((12, 0)))
self.assertTrue(_supports_attn_res_tma((13, 0)))
if __name__ == "__main__":
unittest.main()