[release/2.11] Pass extension sources as str, not pathlib.Path#19
Draft
ethanwee1 wants to merge 1 commit into
Draft
[release/2.11] Pass extension sources as str, not pathlib.Path#19ethanwee1 wants to merge 1 commit into
ethanwee1 wants to merge 1 commit into
Conversation
get_ext_modules() built the CppExtension/CUDAExtension `sources` lists
from `_CSRC_DIR / "..."`, i.e. pathlib.Path objects. Newer
setuptools/distutils enforces that `sources` is a list of str and now
raises:
AssertionError: 'sources' must be a list of strings
which breaks the torchaudio wheel build (setup.py bdist_wheel) on
release/2.11. Wrap each source path in str() so the list contains
plain strings. include_dirs are left as-is (not asserted).
Author
|
Superseded by pytorch#4210. The release/2.11 wheel pipeline builds pytorch/audio release/2.11 (@34c52a67), not ROCm/audio, so the fix belongs upstream. Closing this in favor of the upstream PR. |
ethanwee1
added a commit
to ROCm/pytorch
that referenced
this pull request
Jul 23, 2026
…r fix Build torchaudio from the ROCm/audio release/2.11.0.2 sources-str fix (ROCm/audio#19) so the release/2.11 wheel-stack build gets past the torchaudio `AssertionError: 'sources' must be a list of strings` and validates the full stack (triton pin + AOTriton 0.13b + torchaudio fix) end to end. The commit is hosted on the PR #19 head branch (ethanwee1/audio, no push access to ROCm/audio directly). Once ROCm/audio#19 merges, repoint this at https://github.com/ROCm/audio release/2.11.0.2 @ the merged SHA.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The ROCm release/2.11 wheel-stack build fails while building torchaudio:
get_ext_modules()builds the extensionsourceslists from_CSRC_DIR / "...", i.e.pathlib.Pathobjects. Older setuptools acceptedos.PathLike, but the newer setuptools/distutils in the build image now asserts thatsourcesis a list ofstr.Fix
Wrap each source path in
str().include_dirsare left unchanged (distutils does not assert on them).