Unverified Commit ee085f55 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

set empty cxx flags as default (#3474)


Co-authored-by: default avatarPhilip Meier <pmeier.github@posteo.de>
Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
parent cf59d839
...@@ -181,7 +181,7 @@ def get_extensions(): ...@@ -181,7 +181,7 @@ def get_extensions():
define_macros = [] define_macros = []
extra_compile_args = {} extra_compile_args = {'cxx': []}
if (torch.cuda.is_available() and ((CUDA_HOME is not None) or is_rocm_pytorch)) \ if (torch.cuda.is_available() and ((CUDA_HOME is not None) or is_rocm_pytorch)) \
or os.getenv('FORCE_CUDA', '0') == '1': or os.getenv('FORCE_CUDA', '0') == '1':
extension = CUDAExtension extension = CUDAExtension
...@@ -196,15 +196,11 @@ def get_extensions(): ...@@ -196,15 +196,11 @@ def get_extensions():
else: else:
define_macros += [('WITH_HIP', None)] define_macros += [('WITH_HIP', None)]
nvcc_flags = [] nvcc_flags = []
extra_compile_args = { extra_compile_args["nvcc"] = nvcc_flags
'cxx': [],
'nvcc': nvcc_flags,
}
if sys.platform == 'win32': if sys.platform == 'win32':
define_macros += [('torchvision_EXPORTS', None)] define_macros += [('torchvision_EXPORTS', None)]
extra_compile_args.setdefault('cxx', [])
extra_compile_args['cxx'].append('/MP') extra_compile_args['cxx'].append('/MP')
debug_mode = os.getenv('DEBUG', '0') == '1' debug_mode = os.getenv('DEBUG', '0') == '1'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment