Skip to content

Add topk.py to BUCK#18399

Merged
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
kirklandsign:export-D97649745
Mar 23, 2026
Merged

Add topk.py to BUCK#18399
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
kirklandsign:export-D97649745

Conversation

@kirklandsign
Copy link
Copy Markdown
Contributor

Summary: Fix build

Differential Revision: D97649745

Summary: Fix build

Differential Revision: D97649745
Copilot AI review requested due to automatic review settings March 23, 2026 08:43
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 23, 2026

🔗 Helpful Links

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

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

❌ 1 Awaiting Approval, 1 New Failure, 2 Unrelated Failures

As of commit 444975d with merge base f7977a6 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

NEW FAILURE - The following job has failed:

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 Mar 23, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Mar 23, 2026

@kirklandsign has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97649745.

@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

This PR fixes Buck build packaging for the CUDA Triton kernels by ensuring the newly added topk Triton kernel is included in the triton_kernels Python library target.

Changes:

  • Add backends/cuda/triton/kernels/topk.py to the triton_kernels srcs list in backends/cuda/TARGETS.

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

Comment thread backends/cuda/TARGETS
srcs = [
"triton/kernels/__init__.py",
"triton/kernels/sdpa.py",
"triton/kernels/topk.py",
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

triton/kernels/__init__.py unconditionally imports executorch.backends.cuda.triton.kernels.fused_moe, but triton/kernels/fused_moe.py is not listed in this triton_kernels target's srcs. This can break Buck packaging/imports (any import of ...triton.kernels.* executes __init__.py). Add triton/kernels/fused_moe.py to srcs (and consider adding other imported kernel modules as needed), or make the import conditional in __init__.py if it’s intentionally excluded from the target.

Suggested change
"triton/kernels/topk.py",
"triton/kernels/topk.py",
"triton/kernels/fused_moe.py",

Copilot uses AI. Check for mistakes.
@meta-codesync meta-codesync Bot merged commit aa7c8ce into pytorch:main Mar 23, 2026
162 of 175 checks passed
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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants