mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #233] GLM prompt: the DSA indexer's scores on FP16 tensor cores - dsa_index 824 -> 494 ms on a 27K prompt #411
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#411
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/mw00/project-maya/pull/233
State: closed
Merged: Yes
This moves the prompt path's DSA indexer scores (
dsa_score) onto FP16 tensor cores.The new
dsa_score_tc_kernelkeeps the FP32 tiled kernel's tile: 4 tokens' 128 (token, head) query rows against 64 pools, k = 128. Both operands are staged as FP16 in shared memory. Eight warps each compute 16 rows x 64 pools with WMMA m16n16k16 and FP32 sums. The epilogue (relu(dot) * w summed over the 32 heads) runs in FP32, as before.It is the default on CUDA.
STRATA_GLM_DSA_SCORE=1keeps the FP32 tiled kernel and=0the warp kernel. HIP is unchanged.Measured on Maya-S24, one V100 32 GB, a 27K-token prompt with a needle (cooled runs). This branch, rebased on main
3650d0d:STRATA_GLM_DSA_SCORE=1(FP32 tiled)Two earlier rounds on my branch: dsa_index 826 / 826 -> 495 / 495 ms and prompt 36.9 / 37.0 -> 36.6 / 36.6 s. Greedy tokens stayed within GLM's normal run-to-run spread.
The gain is small, since the indexer is about 2% of a 27K prompt on this card. I only measured it on Volta. It would be worth a check on a newer card.