Skip to content

Commit 44f4834

Browse files
zhangguanheng66Philip Meierfmassa
authored andcommitted
set empty cxx flags as default (#3474)
Summary: Reviewed By: fmassa Differential Revision: D26756255 fbshipit-source-id: 85a51d8732f46718f49c139c2ef920a28ed1c656 Co-authored-by: Philip Meier <[email protected]> Co-authored-by: Francisco Massa <[email protected]>
1 parent ee8c7a0 commit 44f4834

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def get_extensions():
181181

182182
define_macros = []
183183

184-
extra_compile_args = {}
184+
extra_compile_args = {'cxx': []}
185185
if (torch.cuda.is_available() and ((CUDA_HOME is not None) or is_rocm_pytorch)) \
186186
or os.getenv('FORCE_CUDA', '0') == '1':
187187
extension = CUDAExtension
@@ -196,15 +196,11 @@ def get_extensions():
196196
else:
197197
define_macros += [('WITH_HIP', None)]
198198
nvcc_flags = []
199-
extra_compile_args = {
200-
'cxx': [],
201-
'nvcc': nvcc_flags,
202-
}
199+
extra_compile_args["nvcc"] = nvcc_flags
203200

204201
if sys.platform == 'win32':
205202
define_macros += [('torchvision_EXPORTS', None)]
206203

207-
extra_compile_args.setdefault('cxx', [])
208204
extra_compile_args['cxx'].append('/MP')
209205

210206
debug_mode = os.getenv('DEBUG', '0') == '1'

0 commit comments

Comments
 (0)