Repository navigation
Conversation
replayssm_sigmoid_gating_delta_rule rejected any checkpoint that was not FP32, so a model that keeps its KDA state in 16 bits could not use it. The kernel already loads the checkpoint into FP32 for the replay and rounds a flushed state to the checkpoint's dtype, so only the entry's dtype check changes: the checkpoint may be FP32, FP16 or BF16; A_log, dt_bias and the g records stay FP32. The tests run the forward, two verify transitions and the graph capture with FP16 (and the forward with BF16) checkpoints against the reference, and check that an FP64 checkpoint is rejected. bench_kda_replayssm.py takes --ckpt_dtype.
Export CKPT_DTYPES, the checkpoint dtypes replayssm_sigmoid_gating_delta_rule takes, and check against it. A caller that routes by dtype (ATOM's ReplaySSM dispatch) can then send a 16-bit state pool here only when the installed AITER takes it, and keep it on its own kernel with an older AITER.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7975 / #7992: the base is their branch,
feat/gfx1250-replayssm-kda-verify.Motivation
replayssm_sigmoid_gating_delta_rulerejects any checkpoint that is not FP32. A model that keeps its KDA state in 16 bits cannot use it, so its spec verify stays on the caller's Triton kernel. An example is ATOM withATOM_GDN_SSM_DTYPE=fp16orbf16.Technical Details
b_ck.to(gl.float32)), and a flush stores the rebuilt state asckpt.dtype.element_ty. So only the entry's dtype check changes.A_log,dt_biasand the g records stay FP32.CKPT_DTYPES, so a caller that routes by dtype can check what the installed AITER takes.test_replayssm_kda_fwdruns with FP32, FP16 and BF16 checkpoints, with the checkpoint tolerance by dtype.test_verify_two_transitionsandtest_capture_and_side_streamadd an FP16 checkpoint.CKPT_DTYPES.bench_kda_replayssm.pytakes--ckpt_dtype fp32|fp16|bf16.Performance
MI455X (gfx1250), one GPU, spec verify with 5 tokens a request, K = V = 128, BF16 activations and records, us per call (median of CUDA-graph replays of 20 calls). "Triton" is ATOM's
_replayssm_kda_fwd_kernel, the fallback that a 16-bit checkpoint takes today.oand 1e-4 on the checkpoint.Testing
op_tests/triton_tests/attention/test_kda_replayssm.py: 44 passed on gfx1250.black26.10.1 andruff0.16.0 are clean on the changed files.CKPT_DTYPESlists them. Itstests/test_replayssm_dispatch.pygives 49 passed with this branch.