Dependency Resolution Issue for DeepLearning4J on RISC-V Architecture

Subject: Dependency Resolution Issue for DeepLearning4J on RISC-V Architecture

Hello DeepLearning4J community,

I’m attempting to build and test DeepLearning4J on a RISC-V architecture, but I’m encountering dependency resolution issues. When running mvn clean install, I receive the following error:

[Include the main part of the error message here, focusing on the unresolved dependencies]

The build process is unable to resolve the following dependencies:

  • org.nd4j:nd4j-native:jar:linux-riscv64:1.0.0-M2.1
  • org.nd4j:nd4j-native-preset:jar:linux-riscv64:1.0.0-M2.1
  • org.bytedeco:openblas:jar:linux-riscv64:0.3.19-1.5.7
  • org.bytedeco:javacpp:jar:linux-riscv64:1.5.7

I’m using Maven with the Aliyun repository (https://maven.aliyun.com/repository/central).

My questions are:

  1. Is there official support for RISC-V architecture in the current version of DeepLearning4J?
  2. Are these dependencies available for the RISC-V platform?
  3. If not, are there any workarounds or alternative approaches to build DeepLearning4J on RISC-V?
  4. Do you have any suggestions for resolving these dependency issues?

Here’s a summary of my system information:

  • OS: openEuler 24.03 (LTS)
  • Kernel: Linux 6.6.0
  • Architecture: RISC-V 64-bit (riscv64)
  • CPU: 128 cores
  • Memory: 250GB

I’ve already tried forcing an update with mvn -U clean install, but the issue persists.

Any guidance or suggestions would be greatly appreciated. Thank you for your time and assistance!

@hansu we actually don’t have riscv bindings at this time. It would probably take sponsorship to do that with the amount of work and testing involved including hardware. We have manually compiled c++ code for different platforms. I don’t even know what the optimized math libraries on riscv would look like.

In your experience, what are the main technical challenges in porting DeepLearning4J to a new architecture like RISC-V? Is it primarily the lack of optimized math libraries, or are there other significant hurdles?

@hansu there’s just no ecosystem and I’m not sure the performance is worth it. RISCV is also a very scattered architecture. Java itself has barely been ported to riscv. I’m sure it runs but I haven’t heard of any significant workloads running on RISCV where there’s actual money on the table.