Make PyTorch3D C++17 incompatible again :(

Summary: D38919607 (c4545a7cbc) and D38858887 (06cbba2628) were premature, turns out CUDA 10.2 doesn't support C++17.

Reviewed By: bottler

Differential Revision: D39156205

fbshipit-source-id: 5e2e84cc4a57d1113a915166631651d438540d56
This commit is contained in:
Krzysztof Chalupka
2022-08-31 02:38:31 -07:00
committed by Facebook GitHub Bot
parent 1530a66469
commit 95771985b7
3 changed files with 14 additions and 8 deletions

View File

@@ -49,7 +49,7 @@ def get_extensions():
source_cuda = glob.glob(os.path.join(extensions_dir, "**", "*.cu"), recursive=True)
extension = CppExtension
extra_compile_args = {"cxx": []}
extra_compile_args = {"cxx": ["-std=c++14"]}
define_macros = []
include_dirs = [extensions_dir]
@@ -73,6 +73,8 @@ def get_extensions():
"-D__CUDA_NO_HALF_CONVERSIONS__",
"-D__CUDA_NO_HALF2_OPERATORS__",
]
if os.name != "nt":
nvcc_args.append("-std=c++14")
if cub_home is None:
prefix = os.environ.get("CONDA_PREFIX", None)
if prefix is not None and os.path.isdir(prefix + "/include/cub"):