Uh oh!
There was an error while loading. Please reload this page.
Add large CUDA DFlash target prefill and small-query SDPA (#21628) - #21628
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21628
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 35 PendingAs of commit 612e888 with merge base 99924e4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114864646. |
digantdesai
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
This PR needs a |
Summary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
077cfcc to
5b1ce33CompareSummary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
5b1ce33 to
210656aCompareSummary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
210656a to
4cba495CompareSummary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
4cba495 to
c3f2b7bCompareSummary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
c3f2b7b to
817e5c2CompareSummary: Add a CUDA-only `target_prefill` method that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the short `target_forward` verifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export. Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU `kv_len` bounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block. Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison. Reviewed By: digantdesai Differential Revision: D114864646
817e5c2 to
612e888Compare
Summary:
Add a CUDA-only
target_prefillmethod that follows the Solo target prefill path for large prompt chunks, returns final-row logits plus tapped hidden states, and shares the target KV-cache buffers with the shorttarget_forwardverifier. Keep Draft KV state independent and transfer only the final Draft sliding-window hidden rows. MLX retains its existing two-method export.Extend the bf16 Triton split-K SDPA path from single-token decode to small query blocks through Lq=4. Preserve runtime GPU
kv_lenbounds, explicit per-query masks, GQA/MQA support, and CUDA Graph safety while carrying the query-row dimension through the partial softmax accumulation and reduction. This removes the long-context verifier slowdown caused by launching too few CTAs for the fixed four-token DFlash verification block.Add exact-output runner support and a deterministic Solo-versus-DFlash benchmark covering 512/2K/8K/32K/127K prompts, fixed 512-token greedy output, structured prefill/decode/per-call metrics, acceptance statistics, peak memory, and byte-for-byte output comparison.
Reviewed By: digantdesai
Differential Revision: D114864646