Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gpu [2017/10/11 13:07] bojar people should not set CUDA_VISIBLE_DEVICES |
gpu [2024/10/02 15:21] (current) popel |
||
---|---|---|---|
Line 2: | Line 2: | ||
This page summarizes which UFAL servers have some GPU card, and suggests basic diagnostic commands, paths to installed tools, etc., simply everything necessary at the very beginning of using GPUs for experiments. | This page summarizes which UFAL servers have some GPU card, and suggests basic diagnostic commands, paths to installed tools, etc., simply everything necessary at the very beginning of using GPUs for experiments. | ||
+ | |||
+ | **TODO: IN 2022 MOVING FROM SGE TO SLURM** (see [[slurm|slurm guidelines]]) -- **commands like '' | ||
+ | |||
+ | **IN 2024: Newly, all the documentation is at a dedicated wiki https:// | ||
===== Servers with GPU units ===== | ===== Servers with GPU units ===== | ||
- | GPU cluster '' | + | GPU cluster '' |
- | | machine | + | | machine | GPU type | GPU driver version |
- | | iridium | + | | dll1 | Quadro |
- | | titan-gpu | + | | dll3 | NVIDIA RTX A4000 | 510.73.08 | 8.6 | 10 | 16 | 248.8 | |
- | | twister1; twister2; kronos | + | | dll4 | GeForce GTX 1080 Ti | 455.23.05 |
- | | dll1; dll2 | GeForce | + | | dll5 | GeForce GTX 1080 Ti | |
- | | titan | + | | dll6 | NVIDIA RTX A4000 | 510.73.08 | 8.6 | 8 | 16 | 248.8 | |
- | | dll3; dll4; dll5 | GeForce GTX 1080 Ti | | + | | dll7 | NVIDIA RTX A4000 | 510.73.08 | 8.6 | |
- | | dll6 | GeForce GTX 1080 Ti | | + | | dll8 | |
+ | | dll9 | GeForce | ||
+ | | dll10 | GeForce RTX 3090 | 455.23.05 | | ||
+ | |||
+ | GPU cluster '' | ||
+ | |||
+ | | machine | GPU type | GPU driver version | [[https:// | ||
+ | | tdll1 | Quadro P5000 | 455.23.05 | 6.1 | | ||
+ | | tdll2 | | ||
+ | | tdll3 | Quadro P5000 | 455.23.05 | 6.1 | 8 | | ||
+ | | tdll4 | | ||
+ | | tdll5 | | ||
Desktop machines: | Desktop machines: | ||
Line 20: | Line 35: | ||
| athena | | athena | ||
- | Not used at the moment: GeForce GTX 570 (from twister2) | + | Multiple versions of CUDA library are accessible on each machine together with cudnn. Theano and TensorFlow |
- | All machines have CUDA8.0 and should support both Theano and TensorFlow. | + | |
- | === Disk space === | + | [[http://ufaladm2.ufal.hide.ms.mff.cuni.cz/munin/ufal.hide.ms.mff.cuni.cz/lrc-master.ufal.hide.ms.mff.cuni.cz/index.html# |
- | All the GPU machines are at Malá Strana (not at Troja), so you should not use ''/ | + | |
- | - '' | + | |
- | - ''/ | + | |
- | - ''/ | + | |
- | - ''/ | + | |
- | === Individual acquisitions: | ||
- | There is an easy way to get one high-end GPU: [[https://developer.nvidia.com/ | + | ===== Rules ===== |
+ | * First, read [[internal:Linux network]] and [[:Grid]]. | ||
+ | * All the rules from [[:Grid]] apply, even more strictly than for CPU because there are too many GPU users and not as many GPUs available. So as a reminder: always use GPUs via '' | ||
+ | * **Note that you need to use '' | ||
+ | * Always specify the number of GPU cards (e.g. '' | ||
+ | * If you need more than one GPU card (on a single machine), always require at least as many CPU cores ('' | ||
+ | * For interactive jobs, you can use '' | ||
+ | * Note that the dll machines have typically 10 cards, but " | ||
+ | * If you know an approximate runtime of your job, please specify it with '' | ||
- | Take care, however, to coordinate the grant applications a little, so that not too many arrive from UFAL within a short time: these grants are explicitly //not// intended to build GPU clusters, they are " | ||
- | |||
- | Known NVIDIA Academic Hardware Grants: | ||
- | |||
- | * Ondřej Plátek - granted (2015) | ||
- | * Jan Hajič jr. - granted (early 2016) | ||
- | |||
- | |||
- | | ||
===== How to use cluster ===== | ===== How to use cluster ===== | ||
- | In this section will be explained how to use cluster properly. | + | ==== Set-up CUDA and CUDNN ==== |
- | ==== Set-up CUDA and CUDNN ==== | + | Multiple versions of '' |
- | You can add following command into your ~/.bashrc | + | You need to set library path from your '' |
- | | + | |
- | | + | |
- | CUDA_DIR_OPT=/ | + | CUDA_DIR_OPT=/ |
if [ -d " | if [ -d " | ||
CUDA_DIR=$CUDA_DIR_OPT | CUDA_DIR=$CUDA_DIR_OPT | ||
Line 63: | Line 70: | ||
export CPATH=$CUDA_DIR/ | export CPATH=$CUDA_DIR/ | ||
fi | fi | ||
+ | |||
+ | * When not using Theano, just Tensorflow this can be simplified to '' | ||
+ | * Note that the '' | ||
+ | |||
==== TensorFlow Environment ==== | ==== TensorFlow Environment ==== | ||
- | Majority | + | Many people at UFAL use TensorFlow. To start using it it is recommended |
pip install tensorflow | pip install tensorflow | ||
Line 77: | Line 88: | ||
And then you can activate your environment: | And then you can activate your environment: | ||
- | source activate | + | source activate |
- | source activate | + | source activate |
- | This environment have TensorFlow 1.0 and all necessary requirements for NeuralMonkey. | + | This environment have TensorFlow 1.8.0 and all necessary requirements for NeuralMonkey. |
- | ==== Using cluster | + | ==== PyTorch Environment |
- | Rule number one, always use the GPU queue (never log in machine by ssh). Always use qsub or qsubmit with proper arguments. | + | Install PyTorch following |
- | For testing and using the cluster interactively you can use qrsh (this should not be used for long running experiments since the console is not closed on the end of the experiment). Following command will assign you a GPU and creates interactive console. | + | At the time of writing, |
- | qrsh -q gpu.q -l gpu=1,gpu_ram=2G -pty yes bash | + | pip3 install torch==1.10.0+cu111 torchvision==0.11.1+cu111 torchaudio==0.10.0+cu111 |
- | + | ==== Using cluster ==== | |
- | For running experiments you must use qsub command: | + | |
- | | + | As an alternative to '' |
- | + | ||
- | Cleaner way to use cluster is with / | + | |
- | qsubmit --gpumem=2G --queue=" | + | qsubmit --gpumem=2G --queue=" |
| | ||
- | It is recommended to use priority -100 if you are not rushing for the results and don't need to leap over your colleagues jobs. | + | It is recommended to use priority |
==== Basic commands ==== | ==== Basic commands ==== | ||
Line 108: | Line 116: | ||
watch nvidia-smi | watch nvidia-smi | ||
# For monitoring GPU activity in a separate terminal (thanks to Jindrich Libovicky for this!) | # For monitoring GPU activity in a separate terminal (thanks to Jindrich Libovicky for this!) | ||
+ | # You can also use nvidia-smi -l TIME | ||
nvcc --version | nvcc --version | ||
# this should tell CUDA version | # this should tell CUDA version | ||
Line 137: | Line 146: | ||
| titan | GeForce GTX 1080 Ti | | | titan | GeForce GTX 1080 Ti | | ||
| dll1 | (2 GPU) GeForce GTX 1080; cc6.1 | | | dll1 | (2 GPU) GeForce GTX 1080; cc6.1 | | ||
+ | | twister2 | ||
| dll2 | GeForce GTX 1080; cc6.1 | | | dll2 | GeForce GTX 1080; cc6.1 | | ||
| titan-gpu | | titan-gpu | ||
Line 154: | Line 164: | ||
The previous benchmark only compares the speed of processing units within the GPUs and do not take into account the size of memory. Therefore I have conducted another benchmark, this time for each graphic card I have increased the batch size as much as possible so the model still could fit into the GPU (the previous benchmark model had batch size 20). This way the results should be more representative of the power for each GPU. | The previous benchmark only compares the speed of processing units within the GPUs and do not take into account the size of memory. Therefore I have conducted another benchmark, this time for each graphic card I have increased the batch size as much as possible so the model still could fit into the GPU (the previous benchmark model had batch size 20). This way the results should be more representative of the power for each GPU. | ||
- | | GPU; Cuda capability | + | | GPU; Cuda capability |
- | | Tesla K40c; cc3.5 | | + | | GeForce GTX 1080 Ti; cc6.1 | 11 GB | 00:55:56 | 2300 | dll5 | |
- | | GeForce GTX 1080 Ti; cc6.1 | 11 GB | 00:55:56 | 2300 | dll5 | | + | | GeForce GTX 1080; cc6.1 | 8 GB | 01:10:57 | 1700 | dll1 | |
- | | GeForce GTX 1080; cc6.1 | 8 GB | 01:10:57 | 1700 | dll1 | | + | | Quadro P5000 |
| GeForce GTX Titan Z; cc3.5 | 6 GB | 02:20:47 | 1100 | titan-gpu | | | GeForce GTX Titan Z; cc3.5 | 6 GB | 02:20:47 | 1100 | titan-gpu | | ||
- | | Quadro K2000; cc3.0 | 2 GB | 28:15:26 | 50 | iridium | | + | | Quadro K2000; cc3.0 | 2 GB | 28:15:26 | 50 | iridium |
===== Links ===== | ===== Links ===== | ||
Line 168: | Line 178: | ||
GPU specs for those GPUs we have: | GPU specs for those GPUs we have: | ||
* [[http:// | * [[http:// | ||
+ | |||
+ | ==== Individual acquisitions: | ||
+ | |||
+ | There is an easy way to get one high-end GPU: [[https:// | ||
+ | |||
+ | Take care, however, to coordinate the grant applications a little, so that not too many arrive from UFAL within a short time: these grants are explicitly //not// intended to build GPU clusters, they are " | ||
+ | |||
+ | Known NVIDIA Academic Hardware Grants: | ||
+ | |||
+ | * Ondřej Plátek - granted (2015) | ||
+ | * Jan Hajič jr. - granted (early 2016) | ||
+ | |||
+ | |||
+ |