Skip to content

Commit 7a514ec

Browse files
committed
fix to build on AMD cpus
1 parent a3b7a03 commit 7a514ec

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

op_builder/async_io.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def include_paths(self):
3030
return ['csrc/aio/py_lib', 'csrc/aio/common']
3131

3232
def cxx_args(self):
33-
return [
33+
args = [
3434
'-g',
3535
'-Wall',
3636
'-O0',
@@ -41,8 +41,11 @@ def cxx_args(self):
4141
'-march=native',
4242
'-fopenmp',
4343
'-laio',
44-
self.simd_width()
4544
]
45+
sw = self.simd_width()
46+
if sw:
47+
args += [sw]
48+
return args
4649

4750
def extra_ldflags(self):
4851
return ['-laio']

0 commit comments

Comments
 (0)