Skip to content

Fix compile issues in Windows#128

Open
pomelyu wants to merge 2 commits intopytorch:masterfrom
pomelyu:master
Open

Fix compile issues in Windows#128
pomelyu wants to merge 2 commits intopytorch:masterfrom
pomelyu:master

Conversation

@pomelyu
Copy link
Copy Markdown

@pomelyu pomelyu commented May 5, 2026

This PR fixes the following compile issues in windows

1. compiled_autograd.h(1143): error C2872: 'std': ambiguous symbol:

...
      muladd.cu
      tmpxft_00003960_00000000-7_muladd.cudafe1.cpp
      C:/Users/ubuntu/app/mambaforge/envs/gs/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1143): error C2872: 'std': ambiguous symbol
...
Failed to build extension_cpp
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> extension_cpp

This issue has been reported in pytorch/pytorch#173232 and pytorch/pytorch#148317. I followed the suggestion from pytorch/pytorch#148317 (comment) and added flag -DUSE_CUDA=1 to nvcc.

2. ImportError: dynamic module does not define module export function (PyInit__C):

    from pathlib import Path
>   from . import _C, ops
E   ImportError: dynamic module does not define module export function (PyInit__C)

extension_cpp\__init__.py:3: ImportError

Note: In windows, I have to install triton-windows(pip install triton-windows) to resolve the missing triton package.

Already tested in Windows11, pytorch2.11 and WSL, pytorch2.11.

@meta-cla meta-cla Bot added the cla signed label May 5, 2026
@pomelyu pomelyu changed the title Fix compile issue in windows Fix compile issues in windows May 5, 2026
@pomelyu pomelyu changed the title Fix compile issues in windows Fix compile issues in Windows May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant