Mvn commamd built nd4j-native but not nd4j-cuda, what is the cause?

Issue Description

Please describe our issue, along with:

  • Successfully build nd4j-cuda
  • nd4j-native was successfully built but nothing has been done with nd4j-cuda

Version Information

Please indicate relevant versions, including, if relevant:

  • Deeplearning4j version - current newest version
  • Platform information (OS, etc) - Windows 10
  • CUDA version, - CUDA Driver Version / Runtime Version - 11.1 / 10.2

Additional Information

Factually we have successfully built nd4j-native by run the command

mvn clean install -DskipTests=true

followinmg the instructions on this page: deeplearning4j/nd4j at master · eclipse/deeplearning4j · GitHub .

But we found the build is successful but it only generated files in these folders:

no files even no target directory was generated in these folders:

What is the cause? Should there be some modification to the configuration files or additional parameters should be appended to the build command maven?

That is simply the default behavior.

If you want it to build cuda, add this two parameters: -Dlibnd4j.chip=cuda -Pcuda when running the build.

If you only have a specific card in mind when building cuda support, you should also add -Dlibnd4j.compute= with the compute capability level of your GPU.

Otherwise it will take a really long time to build.

@TempKonduitUser1 could you clarify what’s different about your question here vs your previous one you asked? I know you were trying to build cuda before. Last I knew, you had it working in some form and moved on.

@agibsonccc Last time I built libnd4j, this time I build nd4j .

You don’t need to build dl4j module by module, you can simply let maven build the entirety of dl4j from the top level directory.

When you use your original command from the first post in this thread, it will build everything it needs to run on CPU.

With the suggestions from my post, it will build everything it needs to run on the GPU.

@treo Thank you! Your last post solved my problem!