GLM-5.3-Flash support (#36507)
Co-authored-by: zRzRzRzRzRzRzR <Yuxuan.Zhang2@liverpool.ac.uk> Co-authored-by: Shijin Zhang <75300765+Dovis01@users.noreply.github.com> Co-authored-by: zanes-ops <zanes@nvidia.com> Co-authored-by: Baizhou Zhang <sobereddiezhang@gmail.com> Co-authored-by: Jian Chen <jianchen0311@gmail.com> Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com> Co-authored-by: andyluo7 <43718156+andyluo7@users.noreply.github.com> Co-authored-by: Ehsan Akhgari <ehsan.akhgari@gmail.com> Co-authored-by: kpham-sgl <khoa.pham@radixark.ai> Co-authored-by: BBuf <1182563586@qq.com> Co-authored-by: Raiden Makoto <81530826+Raiden-Makoto@users.noreply.github.com>
This commit is contained in:
co-authored by
zRzRzRzRzRzRzR
Shijin Zhang
zanes-ops
Baizhou Zhang
Jian Chen
zijiexia
andyluo7
Ehsan Akhgari
kpham-sgl
BBuf
Raiden Makoto
parent
a9944aec01
commit
97c6978369
@@ -219,6 +219,7 @@ class MockModelRunner:
|
||||
|
||||
self.sliding_window_size = None
|
||||
self.page_size = self.config["page_size"]
|
||||
self.max_running_requests = max_batch_size
|
||||
|
||||
# Create req_to_token_pool
|
||||
self.req_to_token_pool = type(
|
||||
@@ -1240,6 +1241,7 @@ class TestDSAIndexer(CustomTestCase):
|
||||
backend.use_fused_topk = True
|
||||
backend.dsa_topk_backend = topk_backend
|
||||
backend.dsa_index_topk = 2048
|
||||
backend.dsa_index_kpool = 1
|
||||
backend.dsa_decode_impl = "fa3"
|
||||
backend.req_to_token = torch.empty(
|
||||
2, 4096, dtype=torch.int32, device=self.device
|
||||
|
||||
@@ -26,7 +26,7 @@ try:
|
||||
except ImportError:
|
||||
KERNELS_AVAILABLE = False
|
||||
|
||||
register_cuda_ci(est_time=6, stage="base-b-kernel-unit", runner_config="1-gpu-large")
|
||||
register_cuda_ci(est_time=20, stage="base-b-kernel-unit", runner_config="1-gpu-large")
|
||||
register_amd_ci(est_time=10, suite="nightly-amd-kernel-1-gpu", nightly=True)
|
||||
|
||||
|
||||
@@ -234,5 +234,40 @@ def test_mtp_single_step_decode(N: int):
|
||||
assert state_fail_rate < 0.01, f"State mismatch: fail_rate={state_fail_rate:.2f}%"
|
||||
|
||||
|
||||
@pytest.mark.skipif(not KERNELS_AVAILABLE, reason="Kernels not available")
|
||||
def test_verify_scratch_pitch_uses_allocated_steps():
|
||||
# Gear below the allocated step dim must not spill into the neighbor block.
|
||||
N, T, ALLOCATED = 2, 4, 8
|
||||
H, HV, K, V = 16, 32, 128, 128
|
||||
|
||||
A_log, dt_bias, a, b, q, k, v, state, indices, cu_seqlens = _make_tensors(
|
||||
N, T, H, HV, K, V
|
||||
)
|
||||
buffer = torch.full(
|
||||
(N + 1, ALLOCATED, HV, V, K), float("nan"), dtype=torch.float32, device="cuda"
|
||||
)
|
||||
|
||||
run_fused_mtp(
|
||||
A_log,
|
||||
dt_bias,
|
||||
q,
|
||||
k,
|
||||
v,
|
||||
a,
|
||||
b,
|
||||
state,
|
||||
indices,
|
||||
cu_seqlens,
|
||||
disable_state_update=True,
|
||||
intermediate_states_buffer=buffer,
|
||||
intermediate_state_indices=indices,
|
||||
cache_steps=T,
|
||||
)
|
||||
|
||||
assert not torch.isnan(buffer[:N, :T]).any()
|
||||
assert torch.isnan(buffer[N:]).all()
|
||||
assert torch.isnan(buffer[:N, T:]).all()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(pytest.main([__file__, "-v", "-s"]))
|
||||
|
||||
Reference in New Issue
Block a user