Integrate Fireworks KV-outer sparse prefill (fireworks-msa)#7
Closed
ipiszy wants to merge 2 commits into
Closed
Conversation
Split pybind bindings into a g++-compiled translation unit and use minimal ATen headers in the .cu file so nvcc no longer parses torch/extension.h and pybind11 macros. Co-authored-by: Cursor <cursoragent@cursor.com>
Vendore minimax-kernels KV-outer (Python CuTe/AOT + fmha_sm100._C), route GQA>=8 sparse prefill through kvouter_attention, pin CUDA 13 cu13 deps, and split build_k2q_csr into nvcc kernels vs g++ host/pybind so legacy CuTe CSR JIT builds on CUDA 13 nvcc without parsing PyTorch headers. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Closing in favor of a PR targeting the |
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.
Summary
fmha_sm100(Python CuTe-DSL + C++ AOT extensionfmha_sm100._C).kvouter_attentionviasparse_fmha_adapter; legacy CuTe CSR path remains for lower GQA ratios.nvidia-cutlass-dsl[cu13],flash-attn-4[cu13]), addsetup.pyextension build, and document the integration in README/NOTICE.build_k2q_csrinto nvcc kernels + g++ host/pybind so legacy sparse prefill JIT compiles on CUDA 13.3 + PyTorch 2.9.Test plan
git submodule update --init --recursivepip install -e . --no-build-isolationon SM100 + CUDA 13pytest tests/(KV-outer cases require cu13 deps +fmha_sm100._C)FMHA_SM100_KVOUTER_CPP=1 python benchmarks/bench_sparse_attention_ops.py --sections sparse_prefill --dtype fp8 --seqs 4096,8192FMHA_SM100_KVOUTER_CPP=0) still passesMade with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.