update(nemotron-h): add intra-MoE phase profiling (#284)#832
Merged
Conversation
Add opt-in forced-evaluation boundaries inside fused_moe_forward so router, routed-expert, combine, and shared-expert costs can be attributed independently. Keep normal decode unsynchronized, clarify why the routed squared-ReLU kernel was neutral, and document the M1 Ultra re-measurement and evidence gate for future fusion work. Validation: cargo fmt --all -- --check; cargo check -p mlxcel-core; cargo build -p mlxcel-core; cargo clippy -p mlxcel-core --lib -- -D warnings; cargo test -p mlxcel-core --lib ffi_tests::test_compiled_swiglu_activation -- --exact. The full library suite is not a valid backend-neutral gate on this host because existing paged-cache tests fail and a CUDA-only kernel aborts without CUDA. Refs #284
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
fused_moe_forward.Scope decision
Issue #284 records a profiling conclusion plus suggested optimization levers. This change implements the missing measurement gate and deliberately does not ship a speculative hardware kernel before that gate shows recoverable time; any follow-up kernel must demonstrate greedy parity and an unsynchronized throughput win.
Validation
cargo fmt --all -- --checkcargo check -p mlxcel-corecargo build -p mlxcel-corecargo clippy -p mlxcel-core --lib -- -D warningscargo test -p mlxcel-core --lib ffi_tests::test_compiled_swiglu_activation -- --exactcargo test -p mlxcel-core --lib; the backend-neutral run is blocked by two existing paged-cache failures and then a CUDA-only kernel abort on this non-CUDA test process.Closes #284