diff --git a/op_builder/builder.py b/op_builder/builder.py index 2a573d5cf..907f71ccb 100644 --- a/op_builder/builder.py +++ b/op_builder/builder.py @@ -770,7 +770,7 @@ def cxx_args(self): if sys.platform == "win32": return ['-O2'] else: - return ['-O3', '-std=c++17', '-g', '-Wno-reorder'] + return ['-O3', '-g', '-Wno-reorder'] def nvcc_args(self): if self.build_for_cpu: @@ -779,7 +779,7 @@ def nvcc_args(self): if self.is_rocm_pytorch(): ROCM_MAJOR, ROCM_MINOR = self.installed_rocm_version() args += [ - '-std=c++17', '-U__HIP_NO_HALF_OPERATORS__', '-U__HIP_NO_HALF_CONVERSIONS__', + '-U__HIP_NO_HALF_OPERATORS__', '-U__HIP_NO_HALF_CONVERSIONS__', '-U__HIP_NO_HALF2_OPERATORS__', '-DROCM_VERSION_MAJOR=%s' % ROCM_MAJOR, '-DROCM_VERSION_MINOR=%s' % ROCM_MINOR @@ -792,16 +792,8 @@ def nvcc_args(self): except ValueError: nvcc_threads = min(os.cpu_count(), 8) - cuda_major, cuda_minor = installed_cuda_version() - if cuda_major > 10: - if cuda_major == 12 and cuda_minor >= 5: - std_lib = '-std=c++20' - else: - std_lib = '-std=c++17' - else: - std_lib = '-std=c++14' args += [ - '-allow-unsupported-compiler' if sys.platform == "win32" else '', '--use_fast_math', std_lib, + '-allow-unsupported-compiler' if sys.platform == "win32" else '', '--use_fast_math', '-U__CUDA_NO_HALF_OPERATORS__', '-U__CUDA_NO_HALF_CONVERSIONS__', '-U__CUDA_NO_HALF2_OPERATORS__', f'--threads={nvcc_threads}' ]