-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Leqiao/add arm64 support #10981
Leqiao/add arm64 support #10981
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@Craigacp , so the new jars will contains 5 folders like: Does it look right? |
I think the JVM reports the platform as I'm not sure what the cmake changes are doing exactly, if those are required for cross compiling then I guess we should modify the loader logic to emit |
OSX_ARCHITECTURES is a cmake variable at target level. It is an array of strings with length of one or two. It set target specific architectures for macOS. The valid values are:
If you have set CMAKE_OSX_ARCHITECTURES, it will become the default value of OSX_ARCHITECTURES for every cmake target in your project. (The above are not onnxruntime specific. It applies to all cmake projects) So the lines 81-98 in onnxruntime_java.cmake try to extract arch information from OSX_ARCHITECTURES, then use it to set the JNI_ARCH variable which will be used later in line 136. JNI_ARCH variable determines JAVA_PACKAGE_DIR. |
Ok. I think that there needs to be a chunk in |
@leqiao-1 please help make the change. |
…o leqiao/add_arm64_support
@@ -94,6 +94,8 @@ if(APPLE) | |||
endif() | |||
if(JNI_ARCH STREQUAL "x86_64") | |||
set(JNI_ARCH x64) | |||
elseif(JNI_ARCH STREQUAL "arm64") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the new package look like?
I suppose you will have "linux-aarch64" and "osx-aarch64"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, for your information in nuget packages both of them should be "arm64" instead of "aarch64".
Description: add arm64 support
Resolve #10874
Motivation and Context