Skip to content

Commit 20224ec

Browse files
committed
Fixed special instruction set usage on build script.
1 parent f37c9af commit 20224ec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

build.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
'-Wunused', '-Wunused-function', '-Wunused-label',
7474
'-Wunused-parameter', '-Wunused-value', '-Wunused-variable',
7575
'-Wvariadic-macros', '-Wvolatile-register-var', '-Wwrite-strings',
76-
'-pipe', '-Ofast', '-s', '-std=c++17', '-fopenmp',
76+
'-pipe', '-Ofast', '-s', '-std=c++17', '-fopenmp', '-mmmx',
7777
'-msse', '-msse2', '-msse3', '-msse4', '-msse4.1', '-msse4.2',
78-
'-mavx', '-mavx2', '-mfpmath=sse', '-march=native',
79-
'-funroll-loops', '-ffast-math'
78+
'-mavx', '-mavx2', '-mfma', '-mfpmath=sse',
79+
'-march=native', '-funroll-loops', '-ffast-math'
8080
]
8181

8282
if PLATFORM != 'Windows':
@@ -91,6 +91,7 @@
9191
exe_build_args.remove('-Wvolatile-register-var')
9292
exe_build_args.remove('-Weffc++')
9393
exe_build_args.remove('-Ofast')
94+
exe_build_args.remove('-mmmx')
9495
exe_build_args.remove('-msse')
9596
exe_build_args.remove('-msse2')
9697
exe_build_args.remove('-msse3')
@@ -99,6 +100,7 @@
99100
exe_build_args.remove('-msse4.2')
100101
exe_build_args.remove('-mavx')
101102
exe_build_args.remove('-mavx2')
103+
exe_build_args.remove('-mfma')
102104
exe_build_args.remove('-mfpmath=sse')
103105
exe_build_args.remove('-s')
104106

@@ -133,12 +135,11 @@
133135
cuda_build_args.append('/std:c++17')
134136

135137
lib_build_args = lib_build_args + [
136-
'-pipe', '-Ofast', '-s',
137-
'-std=c++17', '-fopenmp',
138-
'-msse', '-msse2', '-msse3',
138+
'-pipe', '-Ofast', '-s', '-std=c++17',
139+
'-fopenmp', '-msse', '-msse2', '-msse3',
139140
'-msse4', '-msse4.1', '-msse4.2',
140-
'-mavx', '-mavx2', '-mfpmath=sse',
141-
'-march=native'
141+
'-mavx', '-mavx2', '-mmmx', '-mfma',
142+
'-mfpmath=sse', '-march=native'
142143
]
143144

144145
cuda_build_args.append('-Iinclude')

0 commit comments

Comments
 (0)