Repository navigation
[HOP] Implementation of torch.switch (1/N) - #182902
bohnstingl wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182902
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 4 Unrelated FailuresAs of commit 00d4c57 with merge base c7a18da ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was 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. |
|
|
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
|
@claude explain those CI failures, check if they are related, and review the changes in this PR |
|
Claude finished @jansel's task in 4m 59s —— View job CI Failure Analysis & Code Review
CI Failure AnalysisAll 13 CI failures are directly caused by this PR and fall into 3 categories: 1.
|
|
@jansel thank you very much for triggering the claude review! This was really helpful. I'd have one question related to the torch.compile handling. There is currently a bit of an inconsistency between the HOPs in the way how they handle the compilation path. For example, while the more recent ones such as I revised switch to also use _maybe_compile_and_run_fn, is this okay with you and shall the others be reworked, or would you prefer any other approach? Also, could you please add @galv as a reviewer as well? |
|
@zou3519 should be able to answer that HOP question |
|
@claude explain those CI failures, are they related? |
|
Claude finished @jansel's task in 1m 40s —— View job CI Failure Analysis
All 5 failures share the same root cause — they are unrelated to this PR's code changes.Every failed job is a (The workflow name varies — Root Cause: CI workflow / branch skewThe CI workflow YAML (which runs from The workflow YAML invokes: python3 .github/scripts/runner_determinator.py \
...
--workflow-name "${WORKFLOW_NAME}"But the branch's FixRebase or merge from Summary
All 5 failures are the same infrastructure issue (CI workflow/branch skew) and are not related to the |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
|
@jansel bad merge? |
|
@bohnstingl yeah I think you raced with the bot, please update it again |
|
@jansel I merged in the latest |
|
@jansel I pulled in the latest main and the tests again seem to be unrelated failures. Is there a chance that this gets merged without all the tests passing? |
|
@claude review these changes |
|
Claude finished @zou3519's task in 12m 54s —— View job Code Review:
|
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
|
@jansel I rebased onto refs/remotes/origin/viable/strict and force-pushed, but the CI failures still remain. How an we proceed here? |
|
DrCI says it's clean so this should work: If not then we can do it with "-i" to ignore the unrelated errors. |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test-osdc (default, 4, 5, mt-l-x86aavx2-29-113-l4) Details for Dev Infra teamRaised by workflow job |
|
@aorenste I added a test skip statement for switch, similar to |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 6 checks: torchtitan-test / torchtitan-x-pytorch-test / test-osdc (torchtitan_features_integration, 1, 1, lf-l-x86aavx2-189-704-a10g-8), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test-osdc (default, 4, 5, mt-l-x86aavx2-29-113-l4), inductor / unit-test / inductor-test / test-osdc (inductor, 2, 2, mt-l-x86aavx2-29-113-a10g), inductor / inductor-test / test-osdc (inductor_timm, 1, 2, mt-l-x86aavx2-29-113-a10g), inductor / inductor-test / test-osdc (inductor_torchbench, 2, 2, mt-l-x86aavx2-29-113-a10g), inductor / inductor-test / test-osdc (inductor_timm, 2, 2, mt-l-x86aavx2-29-113-a10g) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This is the first PR of a series of PRs to add the `torch.switch` functionality, which shares an equivalent API as the JAX implementation under https://docs.jax.dev/en/latest/_autosummary/jax.lax.switch.html. In this PR, we add the initial skeleton of switch with the dense implementation only, along with various tests. In follow-up PRs, we will add _inductor support, Autograd, gen_schema, etc. This PR is related to pytorch#175891 Pull Request resolved: pytorch#182902 Approved by: https://github.com/aorenste, https://github.com/ydwu4
This is the first PR of a series of PRs to add the `torch.switch` functionality, which shares an equivalent API as the JAX implementation under https://docs.jax.dev/en/latest/_autosummary/jax.lax.switch.html. In this PR, we add the initial skeleton of switch with the dense implementation only, along with various tests. In follow-up PRs, we will add _inductor support, Autograd, gen_schema, etc. This PR is related to pytorch#175891 Pull Request resolved: pytorch#182902 Approved by: https://github.com/aorenste, https://github.com/ydwu4
This is the first PR of a series of PRs to add the
torch.switchfunctionality, which shares an equivalent API as the JAX implementation under https://docs.jax.dev/en/latest/_autosummary/jax.lax.switch.html.In this PR, we add the initial skeleton of switch with the dense implementation only, along with various tests. In follow-up PRs, we will add _inductor support, Autograd, gen_schema, etc.
This PR is related to #175891
cc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @jgong5 @mingfeima @sanchitintel @ashokei @jingxu10 @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen @snadampal @voznesenskym @penguinwu @EikanWang @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98 @lakshayg @ydwu4 @ezyang