diff options
author | Leo gautheron <gautheron@iv-cm-359.creatis.insa-lyon.fr> | 2017-04-20 12:12:15 +0200 |
---|---|---|
committer | Leo gautheron <gautheron@iv-cm-359.creatis.insa-lyon.fr> | 2017-04-20 12:12:15 +0200 |
commit | 16f51f971607efab2c73958d207c582b389406c8 (patch) | |
tree | 299a4f6f13faf8545d2144767e9a7791098aacf8 /ot/gpu/cudamat/INSTALL.md | |
parent | 48ec27d8e1c2599bd6d9015d15f4204b8116af28 (diff) |
sinkhorn GPU implementation
Diffstat (limited to 'ot/gpu/cudamat/INSTALL.md')
-rw-r--r-- | ot/gpu/cudamat/INSTALL.md | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ot/gpu/cudamat/INSTALL.md b/ot/gpu/cudamat/INSTALL.md new file mode 100644 index 0000000..95cfef3 --- /dev/null +++ b/ot/gpu/cudamat/INSTALL.md @@ -0,0 +1,53 @@ +Prerequisites +------------- + +cudamat needs the following to be installed first: + +* Python 2.x or 3.x and numpy +* The CUDA SDK +* nose for running the tests (optional) + +Installation +------------ + +Once you have installed the prerequisites and downloaded cudamat, switch to the +cudamat directory and run either of the following commands to install it: + +```bash +# a) Install for your user: +python setup.py install --user +# b) Install for your user, but with pip: +pip install --user . +# c) Install system-wide: +sudo python setup.py install +# d) Install system-wide, but with pip: +sudo pip install . +``` + +If your Nvidia GPU supports a higher Compute Capability than the default one of +your CUDA toolkit, you can set the `NVCCFLAGS` environment variable when +installing cudamat to compile it for your architecture. For example, to install +for your user for a GTX 780 Ti (Compute Capability 3.5), you would run: + +```bash +NVCCFLAGS=-arch=sm_35 python setup.py install --user +``` + +To compile for both Compute Capability 2.0 and 3.5, you would run: + +```bash +NVCCFLAGS="-gencode arch=compute_20,code=sm_20 -gencode arch=compute_35,code=sm_35" ... +``` + +Testing +------- + +To test your setup, run the included unit tests and optionally the benchmark: + +```bash +cd test # so it doesn't try importing cudamat from the source directory +# Run tests +nosetests +# Run benchmark +python ../examples/bench_cudamat.py +``` |