Skip to content

Commit

Permalink
Remove -mfma from compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Sep 28, 2023
1 parent 0af1f7b commit 6785962
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
_SOURCE_DIR = _DIR / "webrtc-audio-processing"
_WEBRTC_DIR = _SOURCE_DIR / "webrtc-audio-processing-1"

__version__ = "1.2.2"
__version__ = "1.2.3"

# webrtc/
# rtc_base/
Expand Down Expand Up @@ -410,15 +410,26 @@
machine_cflags += [
"-DWEBRTC_ARCH_X86_FAMILY",
"-msse2",
"-mfma",
]

if have_avx2:
# Advanced Vector Instructions
machine_cflags += [
"-DWEBRTC_ENABLE_AVX2",
"-mfma",
"-mavx2",
]
webrtc_audio_processing_sources += [
"aec3/adaptive_fir_filter_avx2.cc",
"aec3/adaptive_fir_filter_erl_avx2.cc",
"aec3/fft_data_avx2.cc",
"aec3/matched_filter_avx2.cc",
"aec3/vector_math_avx2.cc",
]
common_audio_sources += [
"fir_filter_avx2.cc",
"resampler/sinc_resampler_avx2.cc",
]

if machine in ("x86_64", "amd64"):
# 64-bit x86_64
Expand All @@ -438,19 +449,6 @@
"resampler/sinc_resampler_sse.cc",
"third_party/ooura/fft_size_128/ooura_fft_sse2.cc",
]

# These have to be included, even if they aren't used
webrtc_audio_processing_sources += [
"aec3/adaptive_fir_filter_avx2.cc",
"aec3/adaptive_fir_filter_erl_avx2.cc",
"aec3/fft_data_avx2.cc",
"aec3/matched_filter_avx2.cc",
"aec3/vector_math_avx2.cc",
]
common_audio_sources += [
"fir_filter_avx2.cc",
"resampler/sinc_resampler_avx2.cc",
]
elif machine in ("armv7", "armv7l"):
# 32-bit ARM
machine_cflags += [
Expand Down

0 comments on commit 6785962

Please sign in to comment.