NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.42k stars 157 forks source link

Can we add `_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH` and `-allow-unsupported-compiler` flags? #198

Open gfxenjoyer opened 2 months ago

gfxenjoyer commented 2 months ago

Starting on VS 2022 17.10 only CUDA 12.4.0 works without special flags (here). Visual Studio Community users have a hard time reverting to an older version — especially if downloading VS for the first time. A lot of the image-to-3D ecosystem is still on CUDA 12.1, and there's a lot of people struggling with compiling nvdiffrast_plugin.

Can we add these flags in ops.py line 47?

opts = ['-DNVDR_TORCH', '-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH=1', '-allow-unsupported-compiler']

For reference here was my solution to this issue in ComfyUI-3D-Pack.