Skip to content

Commit 2f4efd3

Browse files
authored
Revert "Added "-fopenmp" cflags (#2783) (#3006)" (#3038)
This reverts commit 74de51d.
1 parent 7ffc952 commit 2f4efd3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

setup.py

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

182182
define_macros = []
183183

184-
extra_compile_args = {
185-
'cxx': []
186-
}
184+
extra_compile_args = {}
187185
if (torch.cuda.is_available() and ((CUDA_HOME is not None) or is_rocm_pytorch)) \
188186
or os.getenv('FORCE_CUDA', '0') == '1':
189187
extension = CUDAExtension
@@ -198,13 +196,16 @@ def get_extensions():
198196
else:
199197
define_macros += [('WITH_HIP', None)]
200198
nvcc_flags = []
201-
extra_compile_args['nvcc'] = nvcc_flags
199+
extra_compile_args = {
200+
'cxx': [],
201+
'nvcc': nvcc_flags,
202+
}
202203

203204
if sys.platform == 'win32':
204205
define_macros += [('torchvision_EXPORTS', None)]
206+
207+
extra_compile_args.setdefault('cxx', [])
205208
extra_compile_args['cxx'].append('/MP')
206-
elif sys.platform == 'linux':
207-
extra_compile_args['cxx'].append('-fopenmp')
208209

209210
debug_mode = os.getenv('DEBUG', '0') == '1'
210211
if debug_mode:

0 commit comments

Comments
 (0)