You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strategies for getting Tensorflow-Java on Apple Silicon? #394
Like some others I am in need to get Tensorflow-java running on an M1 based machine, certainly now that Apple has released a Tensorflow distribution for M1
[I know there is https://github.com//issues/252 but I want to revive the discussion after Apple's recent efforts]
Before even to attempt doing this I was wondering of any of the underlying strategies do make sense, or alternatively, do work
Compile from source, target arm64 arch, using arm64 tools (e.g Bazel), run java.jar using a arm64 JVM like Zulu 8.58.0.13-CA-macos-aarch64
[This one fails based on the current HEAD. (java.lang.NoSuchMethodError: 'java.lang.Iterable com.sun.tools.javac.code.Scope$WriteableScope.getSymbolsByName(com.sun.tools.javac.util.Name, com.sun.tools.javac.util.Filter)'). It does not even gets to the TF native build phase]
Compile from source using x86 tools (e.g. in a "arch -x86_64 zsh" shell), taking into account specific guidelines e.g. remove usage of specific instruction sets. Consequently, run the java.jar using a x86 JVM, e.g. thus under Rossetta
Any other angle to look at the problem ?
[For that matter, how to leverage other ML frameworks on M1, e.g deeplearning4j ?]
Reacted by Trung Duc Ha, breandan, Kirill Groshkov, Alex Gunnarson and Peter Kriens
Don't try and compile TF-Java using Rosetta, you'll pull in a TF binary which has AVX instructions which will cause a SIGILL and take down the JVM.
I've not tried to compile it on an M1 since we bumped to TF 2.6.0 and made some build changes, I can take a look at doing that. Theoretically you should be able to run mvn package and have it build everything, but I think you'll need to be in a venv which has a version of numpy installed, and be running bazel natively rather than via Rosetta. After that it comes down to a bunch of weird configuration things in bazel which we might not be patching appropriately.
As for other ML frameworks, I've personally got XGBoost and ONNX Runtime working in Java on an M1 Mac and contributed any fixes back upstream. We had ONNX Runtime working a month or two after the M1 came out. Anything that's in pure Java will work just fine on an M1, but I've not looked at dl4j or djl which both have large native libraries inside.
@Craigacp Building under Rosetta but using a TF build config file without the AVX instructions is not an option then ? I was not aware that it is pulling a TF binary, I was under the impression that it pulls the TF repo and does compile TF as part of the TF-J build process.
@Craigacp Building under Rosetta but using a TF build config file without the AVX instructions is not an option then ? I was not aware that it is pulling a TF binary, I was under the impression that it pulls the TF repo and does compile TF as part of the TF-J build process.
Java is slow under Rosetta as it messes with the JIT. You could compile TF without AVX support under Rosetta, but it would probably be fairly slow, and at that point I'm not sure what the utility of it is.
@Craigacp Any pointer on how to get ONNX going, because the this what I get on the home page? LOL
[Edit : I presume you did some cross-compiling to get it work . Going through the docs right now...]
I've not tried cross-compiling. Checkout the ONNX Runtime repo on a M1 Mac and then compile it as normal for java ./build.sh --update --build --config Release --parallel --build_java --test.
Java is slow under Rosetta as it messes with the JIT. You could compile TF without AVX support under Rosetta, but it would probably be fairly slow, and at that point I'm not sure what the utility of it is.
Well, my main dev machine is now an M1, obviously. So, the utility lies in developing TF models locally, but consequently then train them on a TPU/x86 cloud-based machine. I just want to avoid any pain in my development process.
In order to compile it under Rosetta I presume that I need an x86 JVM installed on top of other x86 tools like Bazel, right ?
Yes, you'll need a full x86 development stack, including Python, probably including compilers as well, and then you might need to change how it finds the compilers to make sure it picks the x86 ones.
Some people seem to be able to get arm64 binaries for TF 2.6.0, for example, see tensorflow/tensorflow#52160 (comment).
If that is true, running the build for TF Java with a command line this should work:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project tensorflow-core-generator: Compilation failure
[ERROR] /Users/kgoderis/Development/tensorflow-java/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/proto/framework/OpListOrBuilder.java:[23,7] error: An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR] error-prone version: 2.6.0
[ERROR] BugPattern: JavaLangClash
[ERROR] Stack Trace:
[ERROR] java.lang.NoSuchMethodError: 'java.lang.Iterable com.sun.tools.javac.code.Scope$WriteableScope.getSymbolsByName(com.sun.tools.javac.util.Name, com.sun.tools.javac.util.Filter)'
[ERROR] at com.google.errorprone.bugpatterns.JavaLangClash.check(JavaLangClash.java:66)
[ERROR] at com.google.errorprone.bugpatterns.JavaLangClash.matchClass(JavaLangClash.java:53)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:450)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:151)
[ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:860)
[ERROR] at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
[ERROR] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
[ERROR] at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
[ERROR] at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
[ERROR] at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:152)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:561)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:151)
[ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:614)
[ERROR] at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60)
[ERROR] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
[ERROR] at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
[ERROR] at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
[ERROR] at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
[ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
[ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
[ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
[ERROR] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
[ERROR] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
[ERROR] at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
[ERROR] at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
[ERROR]
On the other hand, diving into the ./tensorflow-core/tensorflow-core-api where the TF core should be built, I was able to start the compilation (sudo bazel build --config opt --cpu=darwin_arm64 --host_cpu=darwin_arm64 --incompatible_restrict_string_escapes=false --experimental_repo_remote_exec --define=ABSOLUTE_JAVABASE=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home --host_javabase=@bazel_tools//tools/jdk:absolute_javabase //:all), but is soon exited with errors like these:
external/org_tensorflow/tensorflow/core/platform/default/port.cc:360:14: error: no matching constructor for initialization of 'tensorflow::port::MemoryInfo'
MemoryInfo mem_info = {INT64_MAX, INT64_MAX};
^ ~~~~~~~~~~~~~~~~~~~~~~
external/org_tensorflow/tensorflow/core/platform/mem.h:62:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct MemoryInfo {
^
external/org_tensorflow/tensorflow/core/platform/mem.h:62:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
external/org_tensorflow/tensorflow/core/platform/mem.h:62:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
external/org_tensorflow/tensorflow/core/platform/default/port.cc:373:23: error: no matching constructor for initialization of 'tensorflow::port::MemoryBandwidthInfo'
MemoryBandwidthInfo membw_info = {INT64_MAX};
^ ~~~~~~~~~~~
external/org_tensorflow/tensorflow/core/platform/mem.h:67:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'long long' to 'const tensorflow::port::MemoryBandwidthInfo' for 1st argument
struct MemoryBandwidthInfo {
^
external/org_tensorflow/tensorflow/core/platform/mem.h:67:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'long long' to 'tensorflow::port::MemoryBandwidthInfo' for 1st argument
external/org_tensorflow/tensorflow/core/platform/mem.h:67:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
Some of you will be happy. I got the whole thing compiled, however I had to skip tests as it was failing on that part, and there were some warnings on TARGET_OS_IPHONE. Apart from that, it kinda looks good:
but unfortunately it fails because in pom.xml we use --add-exports flags for the JVM, which is not supported by the 1.8 JDK. I am not sure why we need these flags in the first place ( I know what the flag is supposed to do), and therefore, what could be a workaround solution. Anyone?
If it builds with 11 why do you need to build it with 8? It should produce Java 8 compatible jar files even when compiled on 11.
Because I want to integrate this in a project which uses Spark NLP, and that only runs on a Java 8 VM. As far as I understand, Java 11 compiled jars do not run ok older JVMs
Ok.... so removing -undefined dynamic_lookup fails to compile as it does not find a lot of the TF symbols, that can definitely explain it. Inspecting the TF binaries, I can notice that the missing symbols are those located in the libtensorflow_framework library. Looks like they are not being resolved transitively by just linking to libtensorflow_cc, even if it depends on it:
libtensorflow_cc.2.10.0.dylib:
@rpath/libtensorflow_cc.2.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtensorflow_framework.2.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
If I add -ltensorflow_framework to the clang++ command, only one symbol remains unresolved, I'll need to investigate more one this one:
Undefined symbols for architecture arm64:
"tensorflow::Node::RunForwardTypeInference()", referenced from:
_Java_org_tensorflow_internal_c_1api_Node_RunForwardTypeInference in jnitensorflow-a42ccb.o
So @saudet, effectively moving libtensorflow_framework from preload to link solved the linkage problem during compilation (btw, can I safely comment out what we currently have in the preload list since we don't support MKL anymore?)
Now, I also had to solve the remaining missing symbol "that didn't look too important" by skipping tensorflow::Node::RunForwardTypeInference from the JavaCPP preset, all tests are passing now!
... and that being said, I'm planning to push these changes to make the codebase in the TF Java repo compilable on M1 machines, and that also includes an upgrade to.... well, I was at 2.10.0 when I started but I should probably now upgrade to 2.11.0 😄
Just recalling that what @DevinTDHasaid previously is still valid, we need to downgrade to Xcode 13.x to get this work until Apple fixes (hopefully) the "malformed trie" issue.
That's it, thanks everyone! I'll let you all know when that PR get merged.
So @saudet, effectively moving libtensorflow_framework from preload to link solved the linkage problem during compilation (btw, can I safely comment out what we currently have in the preload list since we don't support MKL anymore?)
Yes, those libraries are long deprecated, I don't think anyone uses them anymore.
Hey @karllessard, as per usual, thank you for your work on this project. I am wondering if there has been progress on apple silicon support for this project?
Also, I noticed https://github.com/tensorflow/java/actions/runs/7013329954 the other day, which gave me a glint of hope that maybe we'd get apple silicon support AND a bump to TF 2.15, a potent and exciting combination of wins. However, it's unclear if that was just testing for another purpose or testing with the intention of making a new release of this library. Hope you are well.
We're working on reducing the build process complexity and have added support for building macos arm64 jars locally without running bazel (so it's much simpler and likely to work without user intervention). It's not finished yet as we're hitting issues with Windows which either mean we need to still run a full bazel build on Windows, or we need to wait for Intel to fix the libtensorflow builds on Windows. We might merge it into master before then, but a release can't happen till we've figured out the Windows story. The branch where we're doing this work is running TF 2.15 and it'll either be that or 2.16 in the next release depending on the nature of the Windows fix.
Reacted by Kirill Groshkov, mattomatic and Nicolas
Yay, that's awesome, thanks for the update. I don't fall into the camp who require windows support so it's relieving to know that things seem to work aside from that.
Hey, I've come across the same issue and wasn't able to downgrade XCode because of the new MacOS version (which worked before). I don't have any experience with jni so I had no idea what to try next, but I had luck changing the JDK from an aarch64 version to a 32Bit one (Termurin 21 without the aarch64 tag) and now it works! I don't know why but it does, maybe that's interesting for someone with more knowledge or anyone with the same issue who needs a solution fast.
Using an x86 build of TF-Java on Apple Silicon is a bad idea. Apple didn't implement support for AVX vector instructions in Rosetta, so it will crash the JVM whenever it tries to use them. This can be hard to predict as some codepaths may have a fallback to non-vector instructions, but when you hit one it'll cause a SIGILL and take the whole JVM down.
Activity
kgoderis commentedon Nov 8, 2021
Self-note. It seems that the above error is due to me building against a 1.8 JDK, instead of something more recent
Craigacp commentedon Nov 8, 2021
Don't try and compile TF-Java using Rosetta, you'll pull in a TF binary which has AVX instructions which will cause a SIGILL and take down the JVM.
I've not tried to compile it on an M1 since we bumped to TF 2.6.0 and made some build changes, I can take a look at doing that. Theoretically you should be able to run
mvn packageand have it build everything, but I think you'll need to be in a venv which has a version of numpy installed, and be running bazel natively rather than via Rosetta. After that it comes down to a bunch of weird configuration things in bazel which we might not be patching appropriately.As for other ML frameworks, I've personally got XGBoost and ONNX Runtime working in Java on an M1 Mac and contributed any fixes back upstream. We had ONNX Runtime working a month or two after the M1 came out. Anything that's in pure Java will work just fine on an M1, but I've not looked at dl4j or djl which both have large native libraries inside.
kgoderis commentedon Nov 8, 2021
@Craigacp Building under Rosetta but using a TF build config file without the AVX instructions is not an option then ? I was not aware that it is pulling a TF binary, I was under the impression that it pulls the TF repo and does compile TF as part of the TF-J build process.
kgoderis commentedon Nov 8, 2021
@Craigacp Any pointer on how to get ONNX going, because the this what I get on the home page? LOL

[Edit : I presume you did some cross-compiling to get it work . Going through the docs right now...]
Craigacp commentedon Nov 8, 2021
Java is slow under Rosetta as it messes with the JIT. You could compile TF without AVX support under Rosetta, but it would probably be fairly slow, and at that point I'm not sure what the utility of it is.
I've not tried cross-compiling. Checkout the ONNX Runtime repo on a M1 Mac and then compile it as normal for java
./build.sh --update --build --config Release --parallel --build_java --test.kgoderis commentedon Nov 8, 2021
Well, my main dev machine is now an M1, obviously. So, the utility lies in developing TF models locally, but consequently then train them on a TPU/x86 cloud-based machine. I just want to avoid any pain in my development process.
In order to compile it under Rosetta I presume that I need an x86 JVM installed on top of other x86 tools like Bazel, right ?
Craigacp commentedon Nov 8, 2021
Yes, you'll need a full x86 development stack, including Python, probably including compilers as well, and then you might need to change how it finds the compilers to make sure it picks the x86 ones.
saudet commentedon Nov 8, 2021
Some people seem to be able to get arm64 binaries for TF 2.6.0, for example, see tensorflow/tensorflow#52160 (comment).
If that is true, running the build for TF Java with a command line this should work:
BUILD_FLAGS="--cpu=darwin_arm64 --host-cpu=darwin_arm64" mvn clean installkgoderis commentedon Nov 14, 2021
@saudet That did not work unfortunately.
I am able to compile the Tensorflow repo (tensorflow/tensorflow#52160 (comment)), but then Tf-J fails with
On the other hand, diving into the ./tensorflow-core/tensorflow-core-api where the TF core should be built, I was able to start the compilation (
sudo bazel build --config opt --cpu=darwin_arm64 --host_cpu=darwin_arm64 --incompatible_restrict_string_escapes=false --experimental_repo_remote_exec --define=ABSOLUTE_JAVABASE=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home --host_javabase=@bazel_tools//tools/jdk:absolute_javabase //:all), but is soon exited with errors like these:kgoderis commentedon Nov 14, 2021
Update : Bumping Google's errorprone to <errorprone.version>2.10.0</errorprone.version> fixes this error
kgoderis commentedon Nov 14, 2021
Update: Changing .bazelrc in tensorflow-core/tensorflow-core-api to
In addition I bumped .bazelversion to 4.2.1 and changed build.sh to make bazel run under sudo
gets the compilation of that maven compile unit going. Still contains references to the setup on my dev machine, but we are advancing ;-)
kgoderis commentedon Nov 14, 2021
Some of you will be happy. I got the whole thing compiled, however I had to skip tests as it was failing on that part, and there were some warnings on TARGET_OS_IPHONE. Apart from that, it kinda looks good:
kgoderis commentedon Nov 15, 2021
The build fails with Java 8 (arm64)
[Update]
It seems one has to be explicit about the toolchain in .bazelrc. I added
but unfortunately it fails because in pom.xml we use --add-exports flags for the JVM, which is not supported by the 1.8 JDK. I am not sure why we need these flags in the first place ( I know what the flag is supposed to do), and therefore, what could be a workaround solution. Anyone?
Craigacp commentedon Nov 15, 2021
If it builds with 11 why do you need to build it with 8? It should produce Java 8 compatible jar files even when compiled on 11.
kgoderis commentedon Nov 15, 2021
Because I want to integrate this in a project which uses Spark NLP, and that only runs on a Java 8 VM. As far as I understand, Java 11 compiled jars do not run ok older JVMs
43 remaining items
saudet commentedon Dec 15, 2022
Ah, I was looking in the wrong place. JavaCPP adds it automatically so that it behaves more like Linux by default:
https://github.com/bytedeco/javacpp/blob/master/src/main/resources/org/bytedeco/javacpp/properties/macosx-arm64.properties
Try to manually rerun that
clang++ ...command by copy/pasting without-undefined dynamic_lookupsee if it complains.karllessard commentedon Dec 15, 2022
Ok.... so removing
-undefined dynamic_lookupfails to compile as it does not find a lot of the TF symbols, that can definitely explain it. Inspecting the TF binaries, I can notice that the missing symbols are those located in thelibtensorflow_frameworklibrary. Looks like they are not being resolved transitively by just linking tolibtensorflow_cc, even if it depends on it:If I add
-ltensorflow_frameworkto theclang++command, only one symbol remains unresolved, I'll need to investigate more one this one:saudet commentedon Dec 15, 2022
Doesn't look too important. Try to move "tensorflow_framework@.2" from the "preload" list to "link" see if that works:
https://github.com/tensorflow/java/blob/master/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java#L70
mattdornfeld commentedon Dec 15, 2022
@kgoderis am I correct in understanding you got the build to work on M1 with Bazel? Would you be able to share that code?
karllessard commentedon Dec 16, 2022
Oh, good news everyone!!
So @saudet, effectively moving
libtensorflow_frameworkfrompreloadtolinksolved the linkage problem during compilation (btw, can I safely comment out what we currently have in thepreloadlist since we don't support MKL anymore?)Now, I also had to solve the remaining missing symbol "that didn't look too important" by skipping
tensorflow::Node::RunForwardTypeInferencefrom the JavaCPP preset, all tests are passing now!... and that being said, I'm planning to push these changes to make the codebase in the TF Java repo compilable on M1 machines, and that also includes an upgrade to.... well, I was at 2.10.0 when I started but I should probably now upgrade to 2.11.0 😄
Just recalling that what @DevinTDHa said previously is still valid, we need to downgrade to Xcode 13.x to get this work until Apple fixes (hopefully) the "malformed trie" issue.
That's it, thanks everyone! I'll let you all know when that PR get merged.
saudet commentedon Dec 16, 2022
Yes, those libraries are long deprecated, I don't think anyone uses them anymore.
karllessard commentedon Dec 17, 2022
Ok, I'll do that in a separate PR... one day 😅
mattomatic commentedon Dec 8, 2023
Hey @karllessard, as per usual, thank you for your work on this project. I am wondering if there has been progress on apple silicon support for this project?
Also, I noticed https://github.com/tensorflow/java/actions/runs/7013329954 the other day, which gave me a glint of hope that maybe we'd get apple silicon support AND a bump to TF 2.15, a potent and exciting combination of wins. However, it's unclear if that was just testing for another purpose or testing with the intention of making a new release of this library. Hope you are well.
Craigacp commentedon Dec 8, 2023
We're working on reducing the build process complexity and have added support for building macos arm64 jars locally without running bazel (so it's much simpler and likely to work without user intervention). It's not finished yet as we're hitting issues with Windows which either mean we need to still run a full bazel build on Windows, or we need to wait for Intel to fix the libtensorflow builds on Windows. We might merge it into
masterbefore then, but a release can't happen till we've figured out the Windows story. The branch where we're doing this work is running TF 2.15 and it'll either be that or 2.16 in the next release depending on the nature of the Windows fix.karllessard commentedon Dec 9, 2023
Thanks @mattomatic , +1 to everything that Adam mentioned! I believe we'll get that merged soon (with or without Windows)
mattomatic commentedon Dec 12, 2023
Yay, that's awesome, thanks for the update. I don't fall into the camp who require windows support so it's relieving to know that things seem to work aside from that.
mattifrind commentedon Jan 18, 2024
Hey, I've come across the same issue and wasn't able to downgrade XCode because of the new MacOS version (which worked before). I don't have any experience with jni so I had no idea what to try next, but I had luck changing the JDK from an aarch64 version to a 32Bit one (Termurin 21 without the aarch64 tag) and now it works! I don't know why but it does, maybe that's interesting for someone with more knowledge or anyone with the same issue who needs a solution fast.
Craigacp commentedon Jan 18, 2024
Using an x86 build of TF-Java on Apple Silicon is a bad idea. Apple didn't implement support for AVX vector instructions in Rosetta, so it will crash the JVM whenever it tries to use them. This can be hard to predict as some codepaths may have a fallback to non-vector instructions, but when you hit one it'll cause a
SIGILLand take the whole JVM down.Craigacp commentedon May 10, 2024
TF-Java 1.0.0-rc1 has Apple Silicon binaries - https://github.com/tensorflow/java/releases/tag/v1.0.0-rc.1