Prevent FlashInfer sampling from running with CUDA graphs#5791
Conversation
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test 50a7417 |
|
@tdene can you please take a look at this MR? |
|
Can we make flashinfer the default backend (just like vllm) and gracefully fallback to torch if it is not installed? |
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test f1c60b5 |
Done |
|
/ok to test d84e7b6 |
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test 4fb14c2 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29784575241 |
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test 519baaa |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29864635950 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29875881427 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29890584858 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29909532601 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29935241695 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/29974160691 |
Signed-off-by: Siddharth Singh <sidsingh@nvidia.com>
|
Pushed a commit to fix the failing test harness. |
|
/ok to test b571fcd |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/30133076428 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/30136325005 |
What does this PR do?
Prevents FlashInfer sampling from running with CUDA graphs enabled due to a known issue regarding the RNG state not being CUDA-graph safe.
See here for more details: https://www.linkedin.com/pulse/pinned-rng-drifting-crash-from-cuda-graph-chenyang-zhao-csuac/
Also enables more fine-grained dispatching across sampling kernels depending on the batch composition (i.e., different kernels for only top-k, only top-p, and mixed batches).
Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.