Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Does it support Apple M1 cpu? #480

Open
shnapz opened this issue Oct 14, 2022 · 0 comments
Open

Does it support Apple M1 cpu? #480

shnapz opened this issue Oct 14, 2022 · 0 comments

Comments

@shnapz
Copy link

shnapz commented Oct 14, 2022

On the laptop with Apple M1 chip when creating TensorFlowModel:

    TensorFlowLoader
      .create(Id.create(modelId), uri, options, signatureName)
      .get(Duration.ofDays(Integer.MAX_VALUE))

Getting the following error:

[info]   Cause: java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path: [/Users/******/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
[info]   at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673)
[info]   at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
[info]   at java.base/java.lang.System.loadLibrary(System.java:1873)
[info]   at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1738)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1345)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1157)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1133)
[info]   at org.tensorflow.internal.c_api.global.tensorflow.<clinit>(tensorflow.java:12)
[info]   at java.base/java.lang.Class.forName0(Native Method)
[info]   at java.base/java.lang.Class.forName(Class.java:398)
...
[info]   Cause: java.lang.UnsatisfiedLinkError: Could not find jnitensorflow in class, module, and library paths.
[info]   at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1705)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1345)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1157)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1133)
[info]   at org.tensorflow.internal.c_api.global.tensorflow.<clinit>(tensorflow.java:12)
[info]   at java.base/java.lang.Class.forName0(Native Method)
[info]   at java.base/java.lang.Class.forName(Class.java:398)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1212)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1157)
[info]   at org.bytedeco.javacpp.Loader.load(Loader.java:1149)
...
[info]   Cause: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.tensorflow.SavedModelBundle
[info]   at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
[info]   at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
[info]   at com.spotify.zoltar.ModelLoader.get(ModelLoader.java:221)

Looks like the native library is not available for this platform. Is there a guide on workaround?

This issue is causing scio#4515

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant