<dependency>
<groupId>org.jcuda</groupId>
<artifactId>jcuda</artifactId>
<version>11.4.1</version>
</dependency>
JCuda is the Java bindings for NVIDIA® CUDA™ and related libraries.
To use these libraries, you need a CUDA-enabled GPU device and the NVIDIA driver with CUDA support and the CUDA Toolkit from the NVIDIA website. The aim of this project is to simplify development and usage of JCuda wrapper without issues of managing dependencies by yourself (different versions, different OS, different architecture, classpath hell)
For more information take a look at http://jcuda.org/downloads/downloads.html
- Currently support JCuda 0.5.0, 0.5.5, 0.6.0RC (windows-i386, windows-x86_64), 0.6.0, 0.6.5 (windows-i386, windows-x86_64, unix-x86_64, mac-x86_64), 0.7.0a (windows-x86_64, unix-x86_64, mac-x86_64, ppc64, ppc64le), 0.7.5 (windows-x86_64, unix-x86_64, mac-x86_64), 0.7.5b (windows-x86_64, unix-x86_64, ppc64, ppc64le), 0.8.0 (unix-x86_64, ppc64le, apple-x86_64)
- Local Maven repo with different sets of native libs (windows-i386, windows-x86_64, unix-i386, unix-x86_64, mac-x86_64, ppc64, ppc64le)
- Auto detection of OS family name and it's architecture (it's choose needed dependencies automatically)
- Running any main class, that contained JCuda code easily (without classpath hell, just run Maven goal)
-
You need to install Cuda (5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0) for your platform [here] 1
-
Set property <jcuda.version> in pom.xml to what you really use, e.g. 0.5.0 for Cuda 5.0, etc. (Cuda 6.5 - 0.6.5)
- It looks like right now only 0.8.0 or higher versions are usable due to adding of new library in 0.8.0 JCuda
OBSOLETE [at least for now]
If you run JCuda 0.6.0RC and higher on Windows platform everything is okIf you run JCuda 0.5.5 and lower on Windows or Unix platform - you should set profile manually by adding -P windows-x86_64_old or -P windows-x86_old or -P unix-x86_64_old, etc. to mvn clean package command, depends on architecture you use.For more info about Maven profiles take a look [here] 2If you run JCuda 0.6.0 and higher on Unix x86_64 platform - everything is okIf you run JCUda 0.6.0 and higher on Mac x86_64 - everything is ok
OBSOLETE [end of obsolete part]
-
Call mvn clean package to build project (it will copy all dependencies to target/lib dir)
- Users who configure a repository manager like Nexus should add option -Dmaven.repo.local=repo to the mvn clean package command.
-
Call mvn exec:exec to run main class (org.mystic.cuda.JCudaRuntimeTest) with "Hello, JCuda" sample :)
- Users who configure a repository manager like Nexus should add option -Dmaven.repo.local=repo to the mvn exec:exec command.
-
If you want to run code directly from your IDE without Maven - you could do it via Run command in most of the IDE (Intellij IDEA, Eclipse, Netbeans, etc.) All you need to do - is to add property -Djava.library.path=target/lib (more information is on [Stackoverflow] 3)
-
???
-
Fork! Write your own JCuda code! Run! Report bugs! Support!