Skip to content

Commit ebb2496

Browse files
authored
Merge pull request #10 from rhasspy/synesthesiam-20260108-optimizations
Require SSE4.1
2 parents 341d845 + 8910db5 commit ebb2496

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.1.0
4+
5+
- Require SSE4.1 on x86_64
6+
- Use fast math optimizations on non-Windows platforms
7+
38
## 3.0.1
49

510
- Set C++ std version for non-Linux OSes

setup.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
_GGML_DIR = _SRC_DIR / "ggml"
1414
_GGML_SRC_DIR = _GGML_DIR / "src"
1515

16-
version = "3.0.1"
16+
version = "3.1.0"
1717

1818
# -----------------------------------------------------------------------------
1919

@@ -111,9 +111,23 @@ def new_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
111111
libraries = ["advapi32"] # for Reg* crap
112112
else:
113113
# Assume GCC/Clang on Linux/MacOS
114-
extra_compile_args = ["-O3", "-Wno-unused-function"]
114+
extra_compile_args = [
115+
"-O3",
116+
"-Wno-unused-function",
117+
"-ffast-math",
118+
"-fno-math-errno",
119+
"-fno-finite-math-only",
120+
]
115121
libraries = []
116122

123+
if arch == "x86":
124+
# Assume SSE4.2 baseline
125+
extra_compile_args += [
126+
"-msse4.2", # enables SSE2/SSE3/SSSE3/SSE4.1 as well
127+
"-mpopcnt", # part of the de-facto x86-64-v2 baseline
128+
"-mtune=generic", # good across Intel/AMD
129+
]
130+
117131
ext_modules = [
118132
Extension(
119133
name="pysilero_vad.silero_vad",

0 commit comments

Comments
 (0)