Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/183700
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: ❌ 1 New Failure, 2 Unrelated Failures, 2 Unclassified FailuresAs of commit 352078b with merge base bef98a5 ( NEW FAILURE - The following job has failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
I did my best to locate the origin of the dynamo error and filed #183712. |
|
@pytorchbot merge -f "Dynamo error unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use 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 Look into the failure coming from the PR test/dynamo/test_package.py::TestPackage::test_automatic_dynamo_graph_breaks_device_cpu GH job link HUD commit link and see if it's related to the change |
|
Claude finished @huydhn's task in 6m 54s —— View job Investigation:
|
|
I have disabled the test so that pt2 oncall can take a look #183810 |
|
@pytorchbot drci |
|
Let me land this back, give CI a bit more time to finish just in case |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 5 checks: pull / linux-jammy-py3.10-clang18 / test (onnx, 1, 1, linux.4xlarge), trunk / linux-jammy-aarch64-py3.10 / test (default, 2, 5, linux.arm64.m7g.4xlarge), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 10, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (distributed, 3, 3, linux.g4dn.12xlarge.nvidia.gpu), trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (default, 5, 5, linux.g6.4xlarge.experimental.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…80237) ## Context This PR started out as an attempt to port the license file handling, including the concatenation and overwriting of the original LICENSE to a cmake controlled version. However, that proved tricky and brittle, as particularly the overwrite of the LICENSE file introduces race conditions and failure modes for, for example, subsequent builds in the same directory. Instead, [PEP 639](https://peps.python.org/pep-0639/) gives us a clean alternative by embedding all the license files in the wheel. That is why this PR ended up also covering some aspects of #158104, though hopefully with a smaller footprint; because of the discussion over there, I also triggered a manual check of [`inductor-perf-test-nightly-macos.yml`](https://github.com/pytorch/pytorch/actions/runs/25632518115), which came back green. ## Summary Replace the legacy "concatenate every third-party `LICENSE` into the top-level `LICENSE` during `bdist_wheel`" mechanism with the standard [PEP 639](https://peps.python.org/pep-0639/) `license-files` field. Setuptools 77+ implements PEP 639 with directory-preserving placement at `*.dist-info/licenses/<path>`, and scikit-build-core's `tool.scikit-build.wheel.license-files` was already configured the same way during the migration. ## What changes - `setup.py`: remove the `concat_license_files` context manager and its `bdist_wheel` / `sdist` command-class overrides. - `pyproject.toml`: declare `[project].license-files` (mirrors the `tool.scikit-build.wheel.license-files` glob already present), and migrate `license = { text = "BSD-3-Clause" }` to the PEP 639 string form `license = "BSD-3-Clause"` (resolves the existing TODO; the table form is deprecated in setuptools 77+). - `requirements-build.txt` and the `dev` dependency group: bump `setuptools` to `>=77.0.0`, the first release implementing PEP 639. - `third_party/build_bundled.py` and `third_party/LICENSES_BUNDLED.txt`: deleted. The script existed to feed `concat_license_files`; with PEP 639 each third-party license ships individually at its own path, so the concatenation step (and the checked-in artifact it produced) are no longer needed. - `test/test_license.py`: drop the source-tree check that validated `LICENSES_BUNDLED.txt` against `build_bundled.py`. Replace the dist-info check with one that verifies at least one third-party license is shipped under `<dist-info>/licenses/third_party/`. ## Behavior change for downstream consumers Compliance is preserved end-to-end — every third-party license still ships in the wheel. The change is layout, not content: | | Before | After | | --- | --- | --- | | Top-level | `*.dist-info/licenses/LICENSE` (~342 KB, concatenated) | `*.dist-info/licenses/LICENSE` (bare BSD-3-Clause) | | Per-library | (none) | `*.dist-info/licenses/third_party/<lib>/LICENSE` | Tools that scanned a single `LICENSE` file will need to walk the `dist-info` `licenses/` tree instead. ## Replaces This subsumes #182122, which updated `test_license.py` against `main` to support both the legacy and PEP 639 layouts. With the migration landing in this PR, the legacy branch becomes unreachable, so the test is rewritten directly here. ## Test plan - [x] `pytest test/test_license.py` (skips outside an installed wheel; runs and verifies third-party licenses on a built wheel) - [x] Inspect a fresh wheel: `*.dist-info/licenses/LICENSE` contains only the BSD-3-Clause text; `*.dist-info/licenses/third_party/<lib>/LICENSE` exists for representative submodules Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #180237 Approved by: https://github.com/rgommers, https://github.com/atalman, https://github.com/malfet ghstack dependencies: #183700
Install runtime DLLs (OpenMP, libuv, CUDA) into the wheel on Windows via CMake install steps, supporting the scikit-build-core migration. This replaces the equivalent CI copy.bat / copy_cpu.bat scripts that copied DLLs into the source tree before setuptools ran. The setup.py logic that copies torch/lib/_C.lib stays in place here; once _C is built by CMake (later in the stack) the install for that file moves to the same CMakeLists.txt that defines the target. Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #180238 Approved by: https://github.com/atalman ghstack dependencies: #183700, #180237
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
This reverts commit 6814774. Reverted pytorch#183700 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#183700 (comment)))
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
This reverts commit 5eb3682. Reverted pytorch#183700 on behalf of https://github.com/huydhn due to Sorry for reverting your change but the failure is related as it is not failing in trunk ([comment](pytorch#183700 (comment)))
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
…torch#180237) ## Context This PR started out as an attempt to port the license file handling, including the concatenation and overwriting of the original LICENSE to a cmake controlled version. However, that proved tricky and brittle, as particularly the overwrite of the LICENSE file introduces race conditions and failure modes for, for example, subsequent builds in the same directory. Instead, [PEP 639](https://peps.python.org/pep-0639/) gives us a clean alternative by embedding all the license files in the wheel. That is why this PR ended up also covering some aspects of pytorch#158104, though hopefully with a smaller footprint; because of the discussion over there, I also triggered a manual check of [`inductor-perf-test-nightly-macos.yml`](https://github.com/pytorch/pytorch/actions/runs/25632518115), which came back green. ## Summary Replace the legacy "concatenate every third-party `LICENSE` into the top-level `LICENSE` during `bdist_wheel`" mechanism with the standard [PEP 639](https://peps.python.org/pep-0639/) `license-files` field. Setuptools 77+ implements PEP 639 with directory-preserving placement at `*.dist-info/licenses/<path>`, and scikit-build-core's `tool.scikit-build.wheel.license-files` was already configured the same way during the migration. ## What changes - `setup.py`: remove the `concat_license_files` context manager and its `bdist_wheel` / `sdist` command-class overrides. - `pyproject.toml`: declare `[project].license-files` (mirrors the `tool.scikit-build.wheel.license-files` glob already present), and migrate `license = { text = "BSD-3-Clause" }` to the PEP 639 string form `license = "BSD-3-Clause"` (resolves the existing TODO; the table form is deprecated in setuptools 77+). - `requirements-build.txt` and the `dev` dependency group: bump `setuptools` to `>=77.0.0`, the first release implementing PEP 639. - `third_party/build_bundled.py` and `third_party/LICENSES_BUNDLED.txt`: deleted. The script existed to feed `concat_license_files`; with PEP 639 each third-party license ships individually at its own path, so the concatenation step (and the checked-in artifact it produced) are no longer needed. - `test/test_license.py`: drop the source-tree check that validated `LICENSES_BUNDLED.txt` against `build_bundled.py`. Replace the dist-info check with one that verifies at least one third-party license is shipped under `<dist-info>/licenses/third_party/`. ## Behavior change for downstream consumers Compliance is preserved end-to-end — every third-party license still ships in the wheel. The change is layout, not content: | | Before | After | | --- | --- | --- | | Top-level | `*.dist-info/licenses/LICENSE` (~342 KB, concatenated) | `*.dist-info/licenses/LICENSE` (bare BSD-3-Clause) | | Per-library | (none) | `*.dist-info/licenses/third_party/<lib>/LICENSE` | Tools that scanned a single `LICENSE` file will need to walk the `dist-info` `licenses/` tree instead. ## Replaces This subsumes pytorch#182122, which updated `test_license.py` against `main` to support both the legacy and PEP 639 layouts. With the migration landing in this PR, the legacy branch becomes unreachable, so the test is rewritten directly here. ## Test plan - [x] `pytest test/test_license.py` (skips outside an installed wheel; runs and verifies third-party licenses on a built wheel) - [x] Inspect a fresh wheel: `*.dist-info/licenses/LICENSE` contains only the BSD-3-Clause text; `*.dist-info/licenses/third_party/<lib>/LICENSE` exists for representative submodules Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#180237 Approved by: https://github.com/rgommers, https://github.com/atalman, https://github.com/malfet ghstack dependencies: pytorch#183700
Install runtime DLLs (OpenMP, libuv, CUDA) into the wheel on Windows via CMake install steps, supporting the scikit-build-core migration. This replaces the equivalent CI copy.bat / copy_cpu.bat scripts that copied DLLs into the source tree before setuptools ran. The setup.py logic that copies torch/lib/_C.lib stays in place here; once _C is built by CMake (later in the stack) the install for that file moves to the same CMakeLists.txt that defines the target. Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#180238 Approved by: https://github.com/atalman ghstack dependencies: pytorch#183700, pytorch#180237
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
This reverts commit 6814774. Reverted pytorch#183700 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#183700 (comment)))
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
This reverts commit 5eb3682. Reverted pytorch#183700 on behalf of https://github.com/huydhn due to Sorry for reverting your change but the failure is related as it is not failing in trunk ([comment](pytorch#183700 (comment)))
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (pytorchgh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with [Claude Code](https://claude.com/claude-code)
Pull Request resolved: pytorch#183700
Approved by: https://github.com/atalman
…torch#180237) ## Context This PR started out as an attempt to port the license file handling, including the concatenation and overwriting of the original LICENSE to a cmake controlled version. However, that proved tricky and brittle, as particularly the overwrite of the LICENSE file introduces race conditions and failure modes for, for example, subsequent builds in the same directory. Instead, [PEP 639](https://peps.python.org/pep-0639/) gives us a clean alternative by embedding all the license files in the wheel. That is why this PR ended up also covering some aspects of pytorch#158104, though hopefully with a smaller footprint; because of the discussion over there, I also triggered a manual check of [`inductor-perf-test-nightly-macos.yml`](https://github.com/pytorch/pytorch/actions/runs/25632518115), which came back green. ## Summary Replace the legacy "concatenate every third-party `LICENSE` into the top-level `LICENSE` during `bdist_wheel`" mechanism with the standard [PEP 639](https://peps.python.org/pep-0639/) `license-files` field. Setuptools 77+ implements PEP 639 with directory-preserving placement at `*.dist-info/licenses/<path>`, and scikit-build-core's `tool.scikit-build.wheel.license-files` was already configured the same way during the migration. ## What changes - `setup.py`: remove the `concat_license_files` context manager and its `bdist_wheel` / `sdist` command-class overrides. - `pyproject.toml`: declare `[project].license-files` (mirrors the `tool.scikit-build.wheel.license-files` glob already present), and migrate `license = { text = "BSD-3-Clause" }` to the PEP 639 string form `license = "BSD-3-Clause"` (resolves the existing TODO; the table form is deprecated in setuptools 77+). - `requirements-build.txt` and the `dev` dependency group: bump `setuptools` to `>=77.0.0`, the first release implementing PEP 639. - `third_party/build_bundled.py` and `third_party/LICENSES_BUNDLED.txt`: deleted. The script existed to feed `concat_license_files`; with PEP 639 each third-party license ships individually at its own path, so the concatenation step (and the checked-in artifact it produced) are no longer needed. - `test/test_license.py`: drop the source-tree check that validated `LICENSES_BUNDLED.txt` against `build_bundled.py`. Replace the dist-info check with one that verifies at least one third-party license is shipped under `<dist-info>/licenses/third_party/`. ## Behavior change for downstream consumers Compliance is preserved end-to-end — every third-party license still ships in the wheel. The change is layout, not content: | | Before | After | | --- | --- | --- | | Top-level | `*.dist-info/licenses/LICENSE` (~342 KB, concatenated) | `*.dist-info/licenses/LICENSE` (bare BSD-3-Clause) | | Per-library | (none) | `*.dist-info/licenses/third_party/<lib>/LICENSE` | Tools that scanned a single `LICENSE` file will need to walk the `dist-info` `licenses/` tree instead. ## Replaces This subsumes pytorch#182122, which updated `test_license.py` against `main` to support both the legacy and PEP 639 layouts. With the migration landing in this PR, the legacy branch becomes unreachable, so the test is rewritten directly here. ## Test plan - [x] `pytest test/test_license.py` (skips outside an installed wheel; runs and verifies third-party licenses on a built wheel) - [x] Inspect a fresh wheel: `*.dist-info/licenses/LICENSE` contains only the BSD-3-Clause text; `*.dist-info/licenses/third_party/<lib>/LICENSE` exists for representative submodules Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#180237 Approved by: https://github.com/rgommers, https://github.com/atalman, https://github.com/malfet ghstack dependencies: pytorch#183700
Install runtime DLLs (OpenMP, libuv, CUDA) into the wheel on Windows via CMake install steps, supporting the scikit-build-core migration. This replaces the equivalent CI copy.bat / copy_cpu.bat scripts that copied DLLs into the source tree before setuptools ran. The setup.py logic that copies torch/lib/_C.lib stays in place here; once _C is built by CMake (later in the stack) the install for that file moves to the same CMakeLists.txt that defines the target. Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#180238 Approved by: https://github.com/atalman ghstack dependencies: pytorch#183700, pytorch#180237
Stack from ghstack (oldest at bottom):
The PEP 639 migration in the following commit ("Drop setuptools
concat_license_files; adopt PEP 639 license-files") requires
setuptools>=77, which in turn requires packaging>=24.2 to validate
the PEP 639 license expressions in pyproject.toml. The CI docker
image still pinned packaging==24.0.
The version is matched to the floor declared alongside the setuptools
bump in pyproject.toml and requirements-build.txt.
Landing this one-line bump on its own so the docker image refresh
propagates independently of the license PR (gh-180237), which had
been flaking on docker image rebuild races.
Co-Generated with Claude Code