You can find the compute capability for your card [on the NVIDIA website here](https://developer.nvidia.com/cuda-gpus).
For example, a GTX 1080 has compute capability 6.1, for which you would use ```-cc 61``` (note no decimal point).
## OS Specific Requirements
### Android
[Download the NDK](https://developer.android.com/ndk/downloads/), extract it somewhere, and execute the following commands, replacing `android-xxx` with either `android-arm` or `android-x86`:
./buildnativeoperations.sh -c cuda -сс YOUR_DEVICE_ARCH
```
### Windows
See [Windows.md](windows.md)
## Setup for All OS
1. Set a LIBND4J_HOME as an environment variable to the libnd4j folder you've obtained from GIT
* Note: this is required for building nd4j as well.
2. Setup cpu followed by gpu, run the following on the command line:
* For standard builds:
```bash
./buildnativeoperations.sh
./buildnativeoperations.sh -c cuda -сс YOUR_DEVICE_ARCH
```
* For Debug builds:
```bash
./buildnativeoperations.sh blas -b debug
./buildnativeoperations.sh blas -c cuda -сс YOUR_DEVICE_ARCH -b debug
```
* For release builds (default):
```bash
./buildnativeoperations.sh
./buildnativeoperations.sh -c cuda -сс YOUR_DEVICE_ARCH
```
## OpenMP support
OpenMP 4.0+ should be used to compile libnd4j. However, this shouldn't be any trouble, since OpenMP 4 was released in 2015 and should be available on all major platforms.
## Linking with MKL
We can link with MKL either at build time, or at runtime with binaries initially linked with another BLAS implementation such as OpenBLAS. In either case, simply add the path containing `libmkl_rt.so` (or `mkl_rt.dll` on Windows), say `/path/to/intel64/lib/`, to the `LD_LIBRARY_PATH` environment variable on Linux (or `PATH` on Windows), and build or run your Java application as usual. If you get an error message like `undefined symbol: omp_get_num_procs`, it probably means that `libiomp5.so`, `libiomp5.dylib`, or `libiomp5md.dll` is not present on your system. In that case though, it is still possible to use the GNU version of OpenMP by setting these environment variables on Linux, for example:
```bash
export MKL_THREADING_LAYER=GNU
export LD_PRELOAD=/usr/lib64/libgomp.so.1
```
##Troubleshooting MKL
Sometimes the above steps might not be all you need to do. Another additional step might be the need to