# Running ND4J against CUDA 11.6

**URL:** <https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903>\
**Category:** ND4J\
**Created:** [June 18, 2022, 8:48pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903 "2022-06-18T20:48:49Z")\
**Posts on this page:** 9\
**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:** [June 18, 2022, 8:48pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/1 "2022-06-18T20:48:49Z")

</div>

I am (attempting) to run ND4J against NVIDIA CUDA driver 11.6 (linux x86\_64). The latest official release that I can find of ND4J is for driver version 11.2.

What are the odds that I can run the ND4J built for 11.2 against NVIDIA Driver 11.6?

If I can’t do it, is solving this as simple as recompiling ND4J on my machine with NVIDIA Driver 11.6, so it links up with the newer driver?

Thank you, Chris

---

<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:** [June 19, 2022, 1:02pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/2 "2022-06-19T13:02:50Z")

</div>

@chris2 we’re working on an 11.6 release soon.

For now you’ll have to compile from source. If you’re interested I can help with that.  
Otherwise nd4j on cuda 11.2 mainly needs the SDK. The underlying driver and SDK are not necessarily the same thing.

---

<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:** [June 21, 2022, 1:53am UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/3 "2022-06-21T01:53:52Z")

</div>

Yes. I am interested in that! I do not have access to the machines this week, but I should next week.

I have made some progress along these lines. For various reasons, maybe bad ones, I am building the tag 1.0.0-M1.1. The drivers are installed, and we installed and compiled blas, and then got libnd4j to compile. I will provide more details next week. Thank you for offering to help.

---

<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:** [June 21, 2022, 2:09am UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/4 "2022-06-21T02:09:25Z")

</div>

@chris2 yeah that’s all you need to do. There’s nothing wrong with using M1.1 I’m just not sure at the time if we supported all of the various flags in cmake for that. If not you can compile against master just fine. Otherwise for now just try that and see what it does.

Usually when we add new cuda versions we have to occasionally update the relevant compilers and versions of things we compile against. Nothing should stop you from doing that as long as you know what to look for.

---

<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:** [June 30, 2022, 7:10pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/6 "2022-06-30T19:10:21Z")

</div>

Hello. Actually, I apparently have not succeeded in successfully building the deeplearning4j jar files.

I changed the version of my files using the update-versions.sh shell script to 1.0.0-M1.1-custom. Then in the deeplearning4j root directory, I ran a:  
`mvn clean install -Djavacpp.platform=linux-x86_64 -DskipTests -DskipTestResourceEnforcement=true`

Unfortunately this does not produce the classified nd4j-native and nd4j-native-platform jar files the way I expected it would. It produces an unclassified version, and that unclassified version does not really have anything in the JAR file. It’s nearly empty, containing a pom file and properties file. No classes!

I looked at this for inspiration: [deeplearning4j/build-deploy-linux-x86\_64.yml at master · eclipse/deeplearning4j · GitHub](https://github.com/eclipse/deeplearning4j/blob/master/.github/workflows/build-deploy-linux-x86_64.yml)

Are there more detailed instructions somewhere?

Thank you,  
Chris

---

<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:** [June 30, 2022, 11:21pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/7 "2022-06-30T23:21:32Z")

</div>

@chris2 make sure you add -Pcpu. For cuda you need -Pcuda.

Otherwise the backends are excluded from the build. We do that because when trying to build one backend or the other the compiler or other needed tools may not be present.

---

<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 1, 2022, 2:57pm UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/8 "2022-07-01T14:57:39Z")

</div>

Ok! Can I build for both at the same time if I do -Pcpu -Pcuda?

---

<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:** [August 16, 2022, 10:55am UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/9 "2022-08-16T10:55:15Z")

</div>

@chris2 JFYI release for nd4j-cuda-11.6 for M2.1 is published. Go ahead and give it a try.

---

<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:** [August 23, 2022, 12:35am UTC](https://community.konduit.ai/t/running-nd4j-against-cuda-11-6/1903/10 "2022-08-23T00:35:11Z")

</div>

Thanks! I have passed this on to my team, and they’re working the task. We look forward to seeing it run faster.
