Skip to content

Strategies for getting Tensorflow-Java on Apple Silicon? #394

@kgoderis

Description

@kgoderis

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

  1. 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]

  1. 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

  2. Any other angle to look at the problem ?

[For that matter, how to leverage other ML frameworks on M1, e.g deeplearning4j ?]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions