[Python] PyTorch3D Build Fails with "Cannot open include file: 'thrust/detail/cstdint.h'"

Discussão em 'Python' iniciado por Stack, Maio 12, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to build PyTorch3D from source on Windows 11 using CUDA 12.8, but the build fails with the following error during the compilation of CUDA extensions:

    FAILED: D:/Project/3D_Reconstruction/src/pytorch3d/build/temp.win-amd64-cpython-39/Release/.../renderer.norm_sphere_gradients.gpu.obj
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\nvcc ... -c "D:\OneDrive - sgudev\Document\Project\3D_Reconstruction\src\pytorch3d\pytorch3d\csrc\pulsar\gpu\renderer.norm_sphere_gradients.gpu.cu" ...
    C:\cub\cub\device/device_adjacent_difference.cuh(38): fatal error C1083: Cannot open include file: 'thrust/detail/cstdint.h': No such file or directory
    ...
    ninja: build stopped: subcommand failed.
    RuntimeError: Error compiling objects for extension


    I downloaded and installed cub-2.1.0 library into C folder.

    Questions

    • Why is thrust/detail/cstdint.h not found, even though Thrust is included in CUDA 12.8?
    • Is there a compatibility issue between PyTorch3D, CUDA 12.8, and the CUB/Thrust libraries?
    • How can I fix this problem?

    Continue reading...

Compartilhe esta Página