Skip to content

Fix vision install for all files#9465

Merged
atalman merged 3 commits intopytorch:mainfrom
tinglvv:fix-vision-install
Apr 8, 2026
Merged

Fix vision install for all files#9465
atalman merged 3 commits intopytorch:mainfrom
tinglvv:fix-vision-install

Conversation

@tinglvv
Copy link
Copy Markdown
Contributor

@tinglvv tinglvv commented Apr 2, 2026

2026-04-02T12:26:57.0297276Z C:/actions-runner/_work/_temp/conda_environment_23898900289/lib/site-packages/torch/include\c10/cuda/CUDACachingAllocator.h(105): error: invalid combination of type specifiers
2026-04-02T12:26:57.1656746Z     StreamSegmentSize(cudaStream_t s, bool char , size_t sz)
2026-04-02T12:26:57.2674865Z                                            ^
2026-04-02T12:26:57.4435273Z 
2026-04-02T12:26:57.5852644Z C:/actions-runner/_work/_temp/conda_environment_23898900289/lib/site-packages/torch/include\c10/cuda/CUDACachingAllocator.h(106): error: type name is not allowed
2026-04-02T12:26:57.7023246Z         : stream(s), is_small_pool(char ), total_size(sz) {}
2026-04-02T12:26:57.8187869Z                                    ^
2026-04-02T12:26:57.9261140Z 
2026-04-02T12:26:58.7092980Z 2 errors detected in the compilation of "C:/actions-runner/_work/vision/vision/pytorch/vision/torchvision/csrc/ops/cuda/nms_kernel.cu".

Previous fix #9464 only applies to the .cpp files compiled directly by cl.exe, not .cu files via nvcc. Need to change it in the setup.py.

cc @atalman

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 2, 2026

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit f88e169 with merge base 4e58149 (image):

NEW FAILURES - The following jobs have failed:

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

@meta-cla meta-cla bot added the cla signed label Apr 2, 2026
@tinglvv tinglvv force-pushed the fix-vision-install branch from 4980a8f to 7f9a788 Compare April 2, 2026 19:06
@tinglvv tinglvv changed the title Fix vision install Fix vision install for all files Apr 2, 2026
Copy link
Copy Markdown
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jovan2009
Copy link
Copy Markdown

2026-04-02T12:26:57.0297276Z C:/actions-runner/_work/_temp/conda_environment_23898900289/lib/site-packages/torch/include\c10/cuda/CUDACachingAllocator.h(105): error: invalid combination of type specifiers
2026-04-02T12:26:57.1656746Z     StreamSegmentSize(cudaStream_t s, bool char , size_t sz)
2026-04-02T12:26:57.2674865Z                                            ^
2026-04-02T12:26:57.4435273Z 
2026-04-02T12:26:57.5852644Z C:/actions-runner/_work/_temp/conda_environment_23898900289/lib/site-packages/torch/include\c10/cuda/CUDACachingAllocator.h(106): error: type name is not allowed
2026-04-02T12:26:57.7023246Z         : stream(s), is_small_pool(char ), total_size(sz) {}
2026-04-02T12:26:57.8187869Z                                    ^
2026-04-02T12:26:57.9261140Z 
2026-04-02T12:26:58.7092980Z 2 errors detected in the compilation of "C:/actions-runner/_work/vision/vision/pytorch/vision/torchvision/csrc/ops/cuda/nms_kernel.cu".

Previous fix #9464 only applies to the .cpp files compiled directly by cl.exe, not .cu files via nvcc. Need to change it in the setup.py.

cc @atalman

I encounter the same error, I reported it here: pytorch/pytorch#179005 . The issue seems to be with PyTorch itself. This PR pytorch/pytorch#179100 solves it for me, not only for TorchVision but also for when I try to build other projects.

@atalman
Copy link
Copy Markdown
Contributor

atalman commented Apr 6, 2026

HI @jovan2009 the issue is different now:

C:\actions-runner\_work\vision\vision>python pytorch/vision/test/smoke_test.py   || exit /b 1 
Traceback (most recent call last):
  File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\smoke_test.py", line 8, in <module>
    import torch
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\__init__.py", line 3029, in <module>
    import torch._native
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\_native\__init__.py", line 8, in <module>
    from . import cutedsl_utils, ops, registry, triton_utils
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\_native\cutedsl_utils.py", line 6, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

@jovan2009
Copy link
Copy Markdown

jovan2009 commented Apr 6, 2026

HI @jovan2009 the issue is different now:

C:\actions-runner\_work\vision\vision>python pytorch/vision/test/smoke_test.py   || exit /b 1 
Traceback (most recent call last):
  File "C:\actions-runner\_work\vision\vision\pytorch\vision\test\smoke_test.py", line 8, in <module>
    import torch
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\__init__.py", line 3029, in <module>
    import torch._native
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\_native\__init__.py", line 8, in <module>
    from . import cutedsl_utils, ops, registry, triton_utils
  File "C:\actions-runner\_work\_temp\conda_environment_23955132613\lib\site-packages\torch\_native\cutedsl_utils.py", line 6, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

I think that is a completely different issue. Cuda 13.2 builds are still showing the same CUDACachingAllocator.h error:
https://github.com/pytorch/vision/actions/runs/24030647778/job/70078514526

https://github.com/pytorch/vision/actions/runs/23955132613/job/70051911372

My impression is that Cuda 13.2 builds are failing earlier, during building. All the others are failing a test after building successfully.

@atalman

@tinglvv
Copy link
Copy Markdown
Contributor Author

tinglvv commented Apr 6, 2026

Yes, the actual error that should be blocking is the CUDACachingAllocator.h(106): error: type name is not allowed. The other errors ModuleNotFoundError: No module named 'packaging' we have seen this before, I think it is infra issue.

@tinglvv
Copy link
Copy Markdown
Contributor Author

tinglvv commented Apr 7, 2026

@atalman atalman merged commit 6214cb2 into pytorch:main Apr 8, 2026
74 of 90 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Hey @atalman!

You merged this PR, but no labels were added.
The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

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.

3 participants