Skip to content

[Windows] Fix cpp_extension.py invalid shell escaping - #176827

Closed
astrelsky wants to merge 2 commits into
pytorch:mainfrom
astrelsky:rocm_windows_cpp_extension_shlex_fix
Closed

astrelsky wants to merge 2 commits into
pytorch:mainfrom
astrelsky:rocm_windows_cpp_extension_shlex_fix

Conversation

@astrelsky

@astrelsky astrelsky commented Mar 8, 2026 •

Copy link
Copy Markdown
Contributor

This fixes the audio and vision build for rocm windows.

As stated directly in the documentation for shlex, "The shlex module is only designed for Unix shells." https://docs.python.org/3/library/shlex.html#shlex.quote

@pytorchbot label "topic: not user facing"

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @ptrblck @msaroufim @eqy @jerryzh168 @tinglvv @nWEIdia @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

Note that subprocess.list2cmdline is intentionally undocumented and excluded from subprocess.__all__ because it is an implementation detail and the escaping is specific to the MS C runtime.

Fixes #176585

@pytorch-bot

pytorch-bot Bot commented Mar 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176827

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 8993bbd with merge base 82374f2 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the module: rocm AMD GPU support for Pytorch label Mar 8, 2026
@pytorch-bot

pytorch-bot Bot commented Mar 8, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@astrelsky

Copy link
Copy Markdown
Contributor Author

Recommend trying to get this merged the same day as #176727, if possible so everything will build when that is fixed.

I guess the label thing doesn't work in the initial message.

@pytorchbot label "topic: not user facing"

@astrelsky

astrelsky commented Mar 8, 2026 •

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "module: cuda"

@pytorch-bot pytorch-bot Bot added the module: cuda Related to torch.cuda, and CUDA support in general label Mar 8, 2026
@astrelsky

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "module: windows"

@pytorch-bot pytorch-bot Bot added the module: windows Windows support for PyTorch label Mar 8, 2026
@astrelsky astrelsky changed the title [ROCm][Windows] Fix cpp_extension.py invalid shell escaping [Windows] Fix cpp_extension.py invalid shell escaping Mar 8, 2026
@jerryzh168 jerryzh168 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 19, 2026
@astrelsky astrelsky closed this Apr 27, 2026
@astrelsky

Copy link
Copy Markdown
Contributor Author

#175696 has relanded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: cuda Related to torch.cuda, and CUDA support in general module: rocm AMD GPU support for Pytorch module: windows Windows support for PyTorch open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] I can't build Xformers and FA wheels on top of recent Pytorch nightly wheels (after 2026-02-27)

3 participants