Skip to content

[release/2.11] Pass extension sources as str, not pathlib.Path#19

Draft
ethanwee1 wants to merge 1 commit into
ROCm:release/2.11.0.2from
ethanwee1:fix-ext-sources-str-2.11
Draft

[release/2.11] Pass extension sources as str, not pathlib.Path#19
ethanwee1 wants to merge 1 commit into
ROCm:release/2.11.0.2from
ethanwee1:fix-ext-sources-str-2.11

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Jul 23, 2026

Copy link
Copy Markdown

Part of the ROCm release/2.11 wheel-build fix stack tracked by ROCm/pytorch#3477 (all pieces validated together in one combined green build). Jira: https://amd-hub.atlassian.net/browse/AIPYTORCH-827

Why

The ROCm release/2.11 wheel-stack build fails while building torchaudio:

File ".../tools/setup_helpers/extension.py", line ..., in get_ext_modules
    extension(
  ...
  File ".../setuptools/_distutils/extension.py", line 110, in __init__
    raise AssertionError("'sources' must be a list of strings")
AssertionError: 'sources' must be a list of strings

get_ext_modules() builds the extension sources lists from _CSRC_DIR / "...", i.e. pathlib.Path objects. Older setuptools accepted os.PathLike, but the newer setuptools/distutils in the build image now asserts that sources is a list of str.

Fix

Wrap each source path in str(). include_dirs are left unchanged (distutils does not assert on them).

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).
@ethanwee1

Copy link
Copy Markdown
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 ethanwee1 closed this Jul 23, 2026
@ethanwee1 ethanwee1 reopened this Jul 23, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant