Compiling on ARM

Okey, wait for it. :grinning:

@liweigu there isn’t much of a reason to wait. Just compile libnd4j with:
mvn -Djavacpp.platform=linux-arm64 clean install -Dmaven.test.skip=true

Compiling nd4j-native is easy after that. If you want to get it working, there should not be anything stopping you. Otherwise, yes we will publish snapshots later.

When building yourself, you only build for a single platform, so you can’t use the platform dependency that includes all supported platforms. If you want to use a locally built version, you have to use nd4j-native instead of nd4j-native-platform.

@treo That’s not quite true. nd4j-native-platform should work just fine, it’s just that an entry for linux-arm64 hasn’t been added yet since snapshots are not getting published for now.

I get it ,thanks.

While compiling nd4j, it gets error at:

bash buildmultiplescalaversions.sh -Djavacpp.platform=linux-arm64 clean install -DskipTests -Dmaven.javadoc.skip=true -pl ‘!:nd4j-cuda-9.0,!:nd4j-cuda-9.0-platform,!:nd4j-tests’

the error is:

[ERROR] Could not find the selected project in the reactor: :nd4j-cuda-9.0 @

It can be compiled by removing the ‘-pl’ part to:

bash buildmultiplescalaversions.sh -Djavacpp.platform=linux-arm64 clean install -DskipTests -Dmaven.javadoc.skip=true

After that, when compiling my project, org.nd4j:nd4j-native:jar:ios-x86_64:1.0.0-SNAPSHOT cannot be found . The error is:

The following artifacts could not be resolved: org.nd4j:nd4j-native:jar:ios-arm64:1.0.0-SNAPSHOT, org.nd4j:nd4j-native:jar:ios-x86_64:1.0.0-SNAPSHOT: Failure to find org.nd4j:nd4j-native:jar:ios-arm64:1.0.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced

The dl4j’s source code is updated by ‘git pull’ already.

The ios error can be solved by commenting out ios dependency in nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native-platform/pom.xml

    <!--
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>${nd4j.backend}</artifactId>
        <version>${project.version}</version>
        <classifier>${javacpp.platform.ios-arm64}</classifier>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>${nd4j.backend}</artifactId>
        <version>${project.version}</version>
        <classifier>${javacpp.platform.ios-x86_64}</classifier>
    </dependency>
    -->

and recompile nd4j, then my project can be compiled.
And finally, the model can be trained on arm.