Repository navigation
Fix linking error from ODR violation - #80
Merged
Merged
Conversation
LyricZhao
added a commit
that referenced
this pull request
Apr 16, 2026
qiushixiaoyu
pushed a commit
to qiushixiaoyu/DeepGEMM
that referenced
this pull request
Sep 4, 2026
vipulSharma18
added a commit
to fw-ai-external/DeepGEMM
that referenced
this pull request
Oct 13, 2026
… module Port the SM100 NVFP4 x NVFP4 MegaMoE decode kernel and the fused `mega_moe_pre_dispatch` kernel from sgl-project/DeepGEMM@ec226bc (#27, 593e376, deepseek-ai#80, deepseek-ai#81) so Fireworks can drop the separate `sgl_deep_gemm` wheel. Purely additive: the only change to an existing file is the registration hook in csrc/python_api.cpp. No existing header changes, so no existing kernel's JIT cache key changes. - Device code: sgl's headers copied into deep_gemm/include/deep_gemm/mega_nvfp4/ (kernel, pre-dispatch, layout, scheduler, barrier, math/utils/tma_copy, ptx ld_st/tcgen05/tma/utils, sym_buffer, and the `MmaKind` block of types.cuh), moved into namespace `deep_gemm::mega_nvfp4` with includes redirected and nothing else changed (line numbers kept, so even assert-path SASS matches). - Host code: csrc/apis/mega_nvfp4.hpp plus heuristics/nvfp4_mega_moe.hpp and impls/sm100_nvfp4_mega_moe{,_pre_dispatch}.hpp, in `deep_gemm::mega_nvfp4` with `nvfp4`-marked names. Like the separate sgl library, these kernels keep their own SM count, compile for sgl's `sm_100f` target and launch without PDL, so `deep_gemm.set_num_sms`/`set_pdl` and these kernels never affect each other. Not ported: TRT-LLM weight layout, FP8 combine, BF16 and SM90 paths. - Python: deep_gemm/mega_nvfp4 exposes the sgl_deep_gemm subset Fireworks uses (get_symm_buffer_for_mega_moe, transform_weights_for_mega_moe, mega_moe_pre_dispatch, nvfp4_mega_moe, set_num_sms, get_block_m_for_mega_moe, transform_ue4m3_sf_into_required_layout). - tests/test_mega_moe_nvfp4.py ports sgl's pre-dispatch and NVFP4 alphas tests and adds a bytewise check of the NVFP4 pre-dispatch quantization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vipulSharma18
added a commit
to fw-ai-external/DeepGEMM
that referenced
this pull request
Oct 14, 2026
… module Port the SM100 NVFP4 x NVFP4 MegaMoE decode kernel and the fused `mega_moe_pre_dispatch` kernel from sgl-project/DeepGEMM@ec226bc (#27, 593e376, deepseek-ai#80, deepseek-ai#81) so Fireworks can drop the separate `sgl_deep_gemm` wheel. Purely additive: the only change to an existing file is the registration hook in csrc/python_api.cpp. No existing header changes, so no existing kernel's JIT cache key changes. - Device code: sgl's headers copied into deep_gemm/include/deep_gemm/mega_nvfp4/ (kernel, pre-dispatch, layout, scheduler, barrier, math/utils/tma_copy, ptx ld_st/tcgen05/tma/utils, sym_buffer, and the `MmaKind` block of types.cuh), moved into namespace `deep_gemm::mega_nvfp4` with includes redirected and nothing else changed (line numbers kept, so even assert-path SASS matches). - Host code: csrc/apis/mega_nvfp4.hpp plus heuristics/nvfp4_mega_moe.hpp and impls/sm100_nvfp4_mega_moe{,_pre_dispatch}.hpp, in `deep_gemm::mega_nvfp4` with `nvfp4`-marked names. Like the separate sgl library, these kernels keep their own SM count, compile for sgl's `sm_100f` target and launch without PDL, so `deep_gemm.set_num_sms`/`set_pdl` and these kernels never affect each other. Not ported: TRT-LLM weight layout, FP8 combine, BF16 and SM90 paths. - Python: deep_gemm/mega_nvfp4 exposes the sgl_deep_gemm subset Fireworks uses (get_symm_buffer_for_mega_moe, transform_weights_for_mega_moe, mega_moe_pre_dispatch, nvfp4_mega_moe, set_num_sms, get_block_m_for_mega_moe, transform_ue4m3_sf_into_required_layout). - tests/test_mega_moe_nvfp4.py ports sgl's pre-dispatch and NVFP4 alphas tests and adds a bytewise check of the NVFP4 pre-dispatch quantization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vipulSharma18
added a commit
to fw-ai-external/DeepGEMM
that referenced
this pull request
Oct 14, 2026
… module Port the SM100 NVFP4 x NVFP4 MegaMoE decode kernel and the fused `mega_moe_pre_dispatch` kernel from sgl-project/DeepGEMM@ec226bc (#27, 593e376, deepseek-ai#80, deepseek-ai#81) so Fireworks can drop the separate `sgl_deep_gemm` wheel. Purely additive: the only change to an existing file is the registration hook in csrc/python_api.cpp. No existing header changes, so no existing kernel's JIT cache key changes. - Device code: sgl's headers copied into deep_gemm/include/deep_gemm/mega_nvfp4/ (kernel, pre-dispatch, layout, scheduler, barrier, math/utils/tma_copy, ptx ld_st/tcgen05/tma/utils, sym_buffer, and the `MmaKind` block of types.cuh), moved into namespace `deep_gemm::mega_nvfp4` with includes redirected and nothing else changed (line numbers kept, so even assert-path SASS matches). - Host code: csrc/apis/mega_nvfp4.hpp plus heuristics/nvfp4_mega_moe.hpp and impls/sm100_nvfp4_mega_moe{,_pre_dispatch}.hpp, in `deep_gemm::mega_nvfp4` with `nvfp4`-marked names. Like the separate sgl library, these kernels keep their own SM count, compile for sgl's `sm_100f` target and launch without PDL, so `deep_gemm.set_num_sms`/`set_pdl` and these kernels never affect each other. Not ported: TRT-LLM weight layout, FP8 combine, BF16 and SM90 paths. - Python: deep_gemm/mega_nvfp4 exposes the sgl_deep_gemm subset Fireworks uses (get_symm_buffer_for_mega_moe, transform_weights_for_mega_moe, mega_moe_pre_dispatch, nvfp4_mega_moe, set_num_sms, get_block_m_for_mega_moe, transform_ue4m3_sf_into_required_layout). - tests/test_mega_moe_nvfp4.py ports sgl's pre-dispatch and NVFP4 alphas tests and adds a bytewise check of the NVFP4 pre-dispatch quantization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vipulSharma18
added a commit
to fw-ai-external/DeepGEMM
that referenced
this pull request
Oct 14, 2026
…odule (#18) * Add sgl-project's NVFP4 MegaMoE as an additive `deep_gemm.mega_nvfp4` module Port the SM100 NVFP4 x NVFP4 MegaMoE decode kernel and the fused `mega_moe_pre_dispatch` kernel from sgl-project/DeepGEMM@ec226bc (#27, 593e376, deepseek-ai#80, deepseek-ai#81) so Fireworks can drop the separate `sgl_deep_gemm` wheel. Purely additive: the only change to an existing file is the registration hook in csrc/python_api.cpp. No existing header changes, so no existing kernel's JIT cache key changes. - Device code: sgl's headers copied into deep_gemm/include/deep_gemm/mega_nvfp4/ (kernel, pre-dispatch, layout, scheduler, barrier, math/utils/tma_copy, ptx ld_st/tcgen05/tma/utils, sym_buffer, and the `MmaKind` block of types.cuh), moved into namespace `deep_gemm::mega_nvfp4` with includes redirected and nothing else changed (line numbers kept, so even assert-path SASS matches). - Host code: csrc/apis/mega_nvfp4.hpp plus heuristics/nvfp4_mega_moe.hpp and impls/sm100_nvfp4_mega_moe{,_pre_dispatch}.hpp, in `deep_gemm::mega_nvfp4` with `nvfp4`-marked names. Like the separate sgl library, these kernels keep their own SM count, compile for sgl's `sm_100f` target and launch without PDL, so `deep_gemm.set_num_sms`/`set_pdl` and these kernels never affect each other. Not ported: TRT-LLM weight layout, FP8 combine, BF16 and SM90 paths. - Python: deep_gemm/mega_nvfp4 exposes the sgl_deep_gemm subset Fireworks uses (get_symm_buffer_for_mega_moe, transform_weights_for_mega_moe, mega_moe_pre_dispatch, nvfp4_mega_moe, set_num_sms, get_block_m_for_mega_moe, transform_ue4m3_sf_into_required_layout). - tests/test_mega_moe_nvfp4.py ports sgl's pre-dispatch and NVFP4 alphas tests and adds a bytewise check of the NVFP4 pre-dispatch quantization. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mega_nvfp4): fence task-info metadata reads before slot release (upstream deepseek-ai#441) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Some functions missed
inlinespecifier. In JIT mode, it's fine. However, in our use case, we AOT compile and link all kernels into one binary and these functions causes linking error.