Repository navigation
python3Packages.nvidia-cutlass-dsl: 4.5.0 -> 4.6.1 - #739
Merged
Merged
Conversation
sayakpaul
previously approved these changes
Jul 30, 2026
sayakpaul
left a comment
Member
There was a problem hiding this comment.
Will update about the FA4 build.
Comment on lines
-39
to
+43
| pname = | ||
| if cudaPackages.cudaAtLeast "13.0" then | ||
| "nvidia_cutlass_dsl_libs_cu13" | ||
| else | ||
| "nvidia_cutlass_dsl_libs_base"; | ||
| pname = "nvidia_cutlass_dsl_libs_base"; |
Member
There was a problem hiding this comment.
Is this for standardizing the pname?
Member
Author
There was a problem hiding this comment.
cu12/cu13 are now in sync with the package naming/splits, so we can give this the common name.
Comment on lines
+32
to
+35
| hash = | ||
| hashes."${pyShortVersion}-${stdenv.system}-cu${cudaMajor}" | ||
| or (throw "Unsupported Python version: ${pyShortVersion}-${stdenv.system}-cu${cudaMajor}"); | ||
|
|
IlyasMoutawwakil
added a commit
to NanoCode012/kernels-community
that referenced
this pull request
Aug 3, 2026
IlyasMoutawwakil
added a commit
to huggingface/kernels-community
that referenced
this pull request
Aug 4, 2026
* chore: pick changes Dao-AILab/sonic-moe#66 * feat: update quack to 0.5.0 * feat: update quack to 0.6.1 * fix: correct vendored quack _ops_compat import depth in transform/hadamard * refactor: re-vendor clean upstream sonicmoe, drop EP divergence * fix: missed triton op namespace * chore: update major version + remove branch for clean push * use cutedsl 4.6 and update lock * updated lock * revert changes from main * sonic-moe: track kernel-builder main now that cutlass-dsl 4.6.1 landed (huggingface/kernels#739) --------- Co-authored-by: NanoCode012 <nano@axolotl.ai>
IlyasMoutawwakil
added a commit
to huggingface/kernels-community
that referenced
this pull request
Aug 4, 2026
* chore: pick changes Dao-AILab/sonic-moe#66 * feat: update quack to 0.5.0 * feat: update quack to 0.6.1 * fix: correct vendored quack _ops_compat import depth in transform/hadamard * refactor: re-vendor clean upstream sonicmoe, drop EP divergence * fix: missed triton op namespace * chore: update major version + remove branch for clean push * use cutedsl 4.6 and update lock * updated lock * revert changes from main * sonic-moe: EP support (#770) Co-authored-by: IlyasMoutawwakil <moutawwakil.ilyas.tsi@gmail.com> * sonic-moe: fix ep backward (#824) * added ep support * backward fix * sonic-moe: never scatter the uninitialized tail of the colvec reduce … (#1056) * sonic-moe: never scatter the uninitialized tail of the colvec reduce into ds Port of IlyasMoutawwakil/sonic-moe#1 to the vendored kernel. Under expert parallelism the router marks non-local slots with a sentinel expert id, the metadata stage drops them from the histogram, and cu_seqlens_m therefore covers only the sum_valid entries routed to a local expert. QuACK allocates colvec_reduce_partial with torch.empty and only the covered tiles write it, so rows [sum_valid, TK) of ds_scattered are uninitialized memory. s_scatter_idx's tail is zero-filled, so ds[s_scatter_idx] = ds_scattered aliases every one of those rows onto ds[0], with duplicate indices, leaving the surviving value unspecified. ds is the gradient of the routing weights, consumed only by the router, so freed GPU memory becomes mlp.gate's gradient. _scatter_valid_rows redirects the rows no tile wrote to a scratch slot instead of slot 0, and the zero-filled scratch buffer is copied over ds in full, so slots owning no row end at a defined zero. The bound is compared on device: an int(expert_frequency_offset[-1]) would stall the host once per MoE layer per step. Without EP, sum_valid == TK, every row is valid, and this reduces to the scatter it replaces. Also drops a duplicated ds scatter, and zero-inits old_ds_partial/new_ds_partial in the expert-bias path for consistency — untested, as no model exercised here has an expert bias. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: gather ds through the inverse permutation instead of a guarded scatter Per review: `s_reverse_scatter_idx` already carries everything the guarded scatter reconstructed — the general-routing metadata writes each valid lane's grouped row and `TK` at every sentinel lane. So append one zero row to the colvec-reduce output and gather, instead of masking a scatter. Both hazards then go away by construction rather than by masking. A gather writes each output element exactly once, so no duplicate index can reach ds; and no lane addresses [sum_valid, TK), so the uninitialized tail is unreachable rather than merely redirected. Drops the arange, the torch.where and the int64 index temporary — three passes over TK instead of five — and old_ds_partial goes back to torch.empty since every element is now written. Requires s_reverse_scatter_idx in the backward: _DownProjection had it in forward but was not saving it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: trim comments * sonic-moe: drop the torch.compiler.is_compiling asserts --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: publish the EP build to the ep-support branch * sonic-moe: track kernel-builder main now that cutlass-dsl 4.6.1 landed (huggingface/kernels#739) * sonic-moe: EP support (#770) Co-authored-by: IlyasMoutawwakil <moutawwakil.ilyas.tsi@gmail.com> * sonic-moe: fix ep backward (#824) * added ep support * backward fix * sonic-moe: never scatter the uninitialized tail of the colvec reduce … (#1056) * sonic-moe: never scatter the uninitialized tail of the colvec reduce into ds Port of IlyasMoutawwakil/sonic-moe#1 to the vendored kernel. Under expert parallelism the router marks non-local slots with a sentinel expert id, the metadata stage drops them from the histogram, and cu_seqlens_m therefore covers only the sum_valid entries routed to a local expert. QuACK allocates colvec_reduce_partial with torch.empty and only the covered tiles write it, so rows [sum_valid, TK) of ds_scattered are uninitialized memory. s_scatter_idx's tail is zero-filled, so ds[s_scatter_idx] = ds_scattered aliases every one of those rows onto ds[0], with duplicate indices, leaving the surviving value unspecified. ds is the gradient of the routing weights, consumed only by the router, so freed GPU memory becomes mlp.gate's gradient. _scatter_valid_rows redirects the rows no tile wrote to a scratch slot instead of slot 0, and the zero-filled scratch buffer is copied over ds in full, so slots owning no row end at a defined zero. The bound is compared on device: an int(expert_frequency_offset[-1]) would stall the host once per MoE layer per step. Without EP, sum_valid == TK, every row is valid, and this reduces to the scatter it replaces. Also drops a duplicated ds scatter, and zero-inits old_ds_partial/new_ds_partial in the expert-bias path for consistency — untested, as no model exercised here has an expert bias. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: gather ds through the inverse permutation instead of a guarded scatter Per review: `s_reverse_scatter_idx` already carries everything the guarded scatter reconstructed — the general-routing metadata writes each valid lane's grouped row and `TK` at every sentinel lane. So append one zero row to the colvec-reduce output and gather, instead of masking a scatter. Both hazards then go away by construction rather than by masking. A gather writes each output element exactly once, so no duplicate index can reach ds; and no lane addresses [sum_valid, TK), so the uninitialized tail is unreachable rather than merely redirected. Drops the arange, the torch.where and the int64 index temporary — three passes over TK instead of five — and old_ds_partial goes back to torch.empty since every element is now written. Requires s_reverse_scatter_idx in the backward: _DownProjection had it in forward but was not saving it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: trim comments * sonic-moe: drop the torch.compiler.is_compiling asserts --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * sonic-moe: publish the EP build to the ep-support branch * sonic-moe: drop _up_projection_backward_weight from the EP port Re-added by mistake when resolving the #1056 cherry-pick against the re-vendored tree: the whole conflict hunk was taken wholesale, but #1023 removed this function upstream and nothing calls it. Not EP-related either way. * address comments --------- Co-authored-by: NanoCode012 <nano@axolotl.ai> Co-authored-by: Daniël de Kok <me@danieldk.eu> Co-authored-by: AmineDiro <aminedirhoussi1@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch was previously deployed
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.
Needs to be tested with flash-attn4, etc.