# Compiling deeplearning4j with -Pcuda does not produce cuda artifacts

**URL:** <https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926>\
**Category:** Uncategorized\
**Created:** [July 7, 2022, 2:55pm UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926 "2022-07-07T14:55:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris2](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/chris2/32/764_2.png) [@chris2](https://community.konduit.ai/u/chris2)\
**Post date:** [July 7, 2022, 2:55pm UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/1 "2022-07-07T14:55:17Z")

</div>

Hello,

I am working on compiling deeplearning4j for my specific architecture. In the top level directory I am running the command:

`mvn clean install -Pcuda -DskipTests -PskipTestResourceEnforcement=true -Djavacpp.platform=linux-x86_64`

But the following dependencies that I thought should exist are not produced:

- org.nd4j:nd4j-cuda-11.2-platform:jar:chriscustom1.0
- org.deeplearning4j:deeplearning4j-cuda-11.2:jar:chriscustom1.0

Other artifacts are produced, but not this one. I am branched off the 1.0.0-M1.1 tag.

What am I doing wrong?

I can successfully produce a -Pcpu build, FYI, and run on the CPU with it.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [July 8, 2022, 2:27am UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/2 "2022-07-08T02:27:03Z")

</div>

@chris2 you can just download cuda 11.2 support from maven central now. This was fixed last week. Note that going forward we’ll mainly support cuda 11.6 and 11.7 though.

---

<div class="post-metadata">

**Author:** ![chris2](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/chris2/32/764_2.png) [@chris2](https://community.konduit.ai/u/chris2)\
**Post date:** [July 8, 2022, 1:05pm UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/3 "2022-07-08T13:05:59Z")

</div>

Amazing! Can I get cuda 11.6 support from maven central or your baseline or something? I don’t see it yet: [Maven Central Repository Search](https://search.maven.org/search?q=g:org.nd4j%20a:nd4j-cuda-11.6-platform) I’m actually only compiling because I must use 11.6. I was trying wit h 11.2 just to learn how to build it from a simpler test case. @agibsonccc

---

<div class="post-metadata">

**Author:** ![chris2](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/chris2/32/764_2.png) [@chris2](https://community.konduit.ai/u/chris2)\
**Post date:** [July 8, 2022, 5:07pm UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/4 "2022-07-08T17:07:09Z")

</div>

Also, part of why I have had to recompile is that the linux\_x86 \*.so files in the nd4j native packages didn’t work on my older operating system/architecture. They worked after I recompiled them. I have run into the same problem with your new cuda artifacts. Do you have some instructions floating around for compiling the -Pcuda project?

---

<div class="post-metadata">

**Author:** ![chris2](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/chris2/32/764_2.png) [@chris2](https://community.konduit.ai/u/chris2)\
**Post date:** [July 8, 2022, 9:26pm UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/5 "2022-07-08T21:26:49Z")

</div>

Hello! I have discovered a couple of critical facts that I think have taken me 90% of the way to a solution here. For the record:

1. I discovered the shell script change-cuda-versions.sh and have updated it for the proper versions of cuda/cudann/etc
2. You gave me a clue when you said you were all _changing_ the build to build the nd4j backends from the root. When I moved to the nd4j-backends directory and started building there, it started creating the artifacts.

It will be some time before the build is complete, but I think this is going to work.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [July 11, 2022, 8:20am UTC](https://community.konduit.ai/t/compiling-deeplearning4j-with-pcuda-does-not-produce-cuda-artifacts/1926/6 "2022-07-11T08:20:25Z")

</div>

@chris2 yes that’s all you need to do is change the base versions. Basically cuda version support just consists of changing the versions in the pom and ensuring that libnd4j c++ compilation matches that. Cuda 11.6 is on the way with the next release.
