[BE][inductor] Apply PEP 604 type annotations (part 3/3)#175677
[BE][inductor] Apply PEP 604 type annotations (part 3/3)#175677Lucaskabela wants to merge 3 commits intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/175677
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 4 Unrelated FailuresAs of commit d924e21 with merge base 4416f11 ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
Quick note for reviewers:
|
|
@pytorchbot label "topic: not user facing" |
a0f7fec to
c4cfd5b
Compare
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 2 checks: Limited CI on H100 / linux-jammy-cuda12_8-py3_10-gcc11-sm90-FA3-ABI-stable-test / test, rocm-mi300 / linux-noble-rocm-py3.12-mi300 / test (default, 2, 6, linux.rocm.gpu.gfx942.1) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m "Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable" -c autorevert This PR is attributed to have caused regression in: Please investigate and fix the issues. |
|
Claude finished @pytorch-auto-revert[bot]'s task in 52s —— View job Revert Analysis
Root CauseThe pyrefly linter found an unresolved _original_gm: Optional[torch.fx.GraphModule] = NoneThe issue is that the PR converted most Since the file already uses Verdict✅ This is a legitimate reason for revert. The PR introduced a bug where FixThe author should change line 473 from: _original_gm: Optional[torch.fx.GraphModule] = Noneto: _original_gm: torch.fx.GraphModule | None = NoneThis follows the PEP 604 style that the rest of the file (and the rest of the PR) uses, and removes the need for the |
|
@pytorchbot successfully started a revert job. Check the current status here. |
…5677)" This reverts commit dbf26c1. Reverted #175677 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](#175677 (comment)))
|
@pytorchmergebot merge -i |
|
Failures are 32bit indexing, unrelated to this PR |
Merge startedYour change will be merged while ignoring the following 6 checks: trunk / linux-jammy-rocm-py3.10 / test (default, 3, 6, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10 / test (default, 1, 6, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (default, 5, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (default, 2, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu), rocm-mi300 / linux-noble-rocm-py3.12-mi300 / test (default, 5, 6, linux.rocm.gpu.gfx942.1), rocm-mi300 / linux-noble-rocm-py3.12-mi300 / test (default, 3, 6, linux.rocm.gpu.gfx942.1) 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 (distributed, 2, 3, lf.linux.g4dn.12xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge |
|
This test also fails on #175676 |
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: 2 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (distributed, 2, 3, linux.rocm.gpu.gfx950.4), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (distributed, 2, 3, lf.linux.g4dn.12xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge |
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: Limited CI on H100 / linux-jammy-cuda12_8-py3_10-gcc11-sm90-FA3-ABI-stable-test / test Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: Limited CI on H100 / linux-jammy-cuda12_8-py3_10-gcc11-sm90-FA3-ABI-stable-test / test, inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable), inductor / inductor-test / test (inductor_torchbench, 1, 2, linux.g5.4xlarge.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
) Convert Union[X, Y] to X | Y and Optional[X] to X | None using ruff rules UP007 and UP045 in torch/_inductor. This covers files from fx_passes/misc_patterns through wrapper_benchmark. Split with Claude. See also pytorch#175675 and pytorch#175676 Pull Request resolved: pytorch#175677 Approved by: https://github.com/v0i0
) Convert Union[X, Y] to X | Y and Optional[X] to X | None using ruff rules UP007 and UP045 in torch/_inductor. This covers files from fx_passes/misc_patterns through wrapper_benchmark. Split with Claude. See also pytorch#175675 and pytorch#175676 Pull Request resolved: pytorch#175677 Approved by: https://github.com/v0i0
…orch#175677)" This reverts commit dbf26c1. Reverted pytorch#175677 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#175677 (comment)))
) Convert Union[X, Y] to X | Y and Optional[X] to X | None using ruff rules UP007 and UP045 in torch/_inductor. This covers files from fx_passes/misc_patterns through wrapper_benchmark. Split with Claude. See also pytorch#175675 and pytorch#175676 Pull Request resolved: pytorch#175677 Approved by: https://github.com/v0i0
Convert Union[X, Y] to X | Y and Optional[X] to X | None using ruff rules UP007 and UP045 in torch/_inductor. This covers files from fx_passes/misc_patterns through wrapper_benchmark.
Split with Claude.
See also #175675 and #175676
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo