Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac ARM: Possibly missing opus optimizations #2806

Open
hoffie opened this issue Aug 23, 2022 · 4 comments
Open

Mac ARM: Possibly missing opus optimizations #2806

hoffie opened this issue Aug 23, 2022 · 4 comments
Assignees
Labels
bug Something isn't working macOS macOS runtime issue

Comments

@hoffie
Copy link
Member

hoffie commented Aug 23, 2022

Describe the bug
It looks like none of the existing opus optimization rules match arm64:

contains(QT_ARCH, armeabi-v7a) | contains(QT_ARCH, arm64-v8a) {

To Reproduce

To be investigated.

Expected behavior

M1 builds should use the opus ARM performance enhancements.

Screenshots

Operating system

Mac M1 / arm

Version of Jamulus

master

@hoffie hoffie added the bug Something isn't working label Aug 23, 2022
@hoffie
Copy link
Member Author

hoffie commented Aug 31, 2022

Confirmed, the arm64e builds indeed do not show signs of the flags which enable opus arm optimizations.

https://github.com/jamulussoftware/jamulus/runs/8088131207?check_suite_focus=true#step:10:1137

/Applications/Xcode_13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -pipe -O2  -arch arm64 -isysroot /Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=10.14 -Wall -Wextra -fPIC -DAPP_VERSION=\"3.9.0dev-4c55c39\" -DCUSTOM_MODES -D_REENTRANT -DQT_NO_DEPRECATED_WARNINGS -DOPUS_BUILD=1 -DUSE_ALLOCA=1 -DOPUS_HAVE_RTCD=1 -DHAVE_LRINTF=1 -DHAVE_LRINT=1 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I../../jamulus -I. -I../src -I../libs/opus/include -I../libs/opus/celt -I../libs/opus/silk -I../libs/opus/silk/float -I../libs/opus/silk/fixed -I../libs/opus -I/usr/local/opt/qt/6.3.1/macos/lib/QtWidgets.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtMultimedia.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtGui.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtNetwork.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtXml.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtConcurrent.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/lib/QtCore.framework/Headers -I. -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/opt/qt/6.3.1/macos/mkspecs/macx-clang -F/usr/local/opt/qt/6.3.1/macos/lib -o VAD.o ../libs/opus/silk/VAD.c

https://eclecticlight.co/2021/08/06/accelerating-the-m1-mac-an-introduction-to-simd/

But all M1 Macs support the full ARM64 SIMD, also known as NEON.

Therefore, I'm trying to enable it now and will submit a PR for testing if successful.

hoffie added a commit to hoffie/jamulus that referenced this issue Aug 31, 2022
This allows for non-mandatory usage of the following instructions:
* ARM NEON on arm64 (e.g. Mac M1) or armhf (Raspberry)
* ARM NEON AARCH64 on arm64
* ARM EDSP & MEDIA on any arm-based architecture
* x86_64 AVX

Fixes: jamulussoftware#2806
hoffie added a commit to hoffie/jamulus that referenced this issue Aug 31, 2022
This allows for non-mandatory usage of the following instructions:
* ARM NEON on arm64 (e.g. Mac M1) or armhf (Raspberry)
* ARM NEON AARCH64 on arm64
* ARM EDSP & MEDIA on any arm-based architecture
* x86_64 AVX

Fixes: jamulussoftware#2806
@ann0see ann0see changed the title Mac M1: Possibly missing opus optimizations Mac ARM: Possibly missing opus optimizations Sep 11, 2022
@pljones pljones added this to the Release 3.10.0 milestone Oct 5, 2022
@pljones
Copy link
Collaborator

pljones commented Apr 19, 2023

@hoffie is this likely to progress?

@pljones pljones removed this from the Release 3.10.0 milestone May 31, 2023
@pljones
Copy link
Collaborator

pljones commented May 31, 2023

Dropped until picked up again.

@ann0see
Copy link
Member

ann0see commented Jun 3, 2023

I think this is related to the macOS build failure via Xcode...

@ann0see ann0see added this to Tracking Jul 1, 2023
@github-project-automation github-project-automation bot moved this to Triage in Tracking Jul 1, 2023
@pljones pljones added the macOS macOS runtime issue label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS macOS runtime issue
Projects
Status: Triage
Development

No branches or pull requests

3 participants