Skip to content

[aoti-cuda] fuse MoE fixes#18934

Open
digantdesai wants to merge 2 commits intomainfrom
digantdesai/fused_moe_fixes
Open

[aoti-cuda] fuse MoE fixes#18934
digantdesai wants to merge 2 commits intomainfrom
digantdesai/fused_moe_fixes

Conversation

@digantdesai
Copy link
Copy Markdown
Contributor

No description provided.

test_eager_correctness, test_single_expert, and
test_batched_correctness used 5% relative tolerance for INT4
kernel-vs-dequant comparison. Tighten to 2% to match the e2e
runner bar (fe71bd4).
Copilot AI review requested due to automatic review settings April 16, 2026 04:45
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 16, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18934

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ You can merge normally! (2 Unrelated Failures)

As of commit 75a2348 with merge base ec8d70b (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2026
@digantdesai digantdesai changed the title [aoti-cuda] remove op/kernel level benchmarking scripts [aoti-cuda] fuse MoE fixes Apr 16, 2026
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes CUDA AOTI kernel/op benchmarking scripts from the repo, and also makes fused MoE correctness tests stricter to catch larger numeric discrepancies.

Changes:

  • Delete Triton SDPA benchmark script (benchmark_sdpa.py).
  • Delete fused MoE benchmark script (benchmark_moe.py).
  • Tighten fused MoE test relative-diff tolerance from 0.05 to 0.02.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
backends/cuda/tests/test_fused_moe.py Tightens numerical correctness thresholds for fused MoE kernels.
backends/cuda/benchmarks/benchmark_sdpa.py Removed SDPA benchmarking script (Triton vs PyTorch SDPA backends).
backends/cuda/benchmarks/benchmark_moe.py Removed fused MoE benchmarking script (Triton vs eager/compile baselines).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 303 to 306
self.assertLess(
rel,
0.05,
0.02,
f"{desc}: relative diff {rel:.4f} (abs {diff:.6f})",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should create a global const for the threshold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants