TechNOTE

NVIDIA A100 사용하기 본문

딥러닝, 연구

NVIDIA A100 사용하기

JU1234 2021. 8. 25. 16:21

회사에 A100이 들어왔대서 써보려구 걍 돌려봤는데.. 

띠용~~ 7배가 느리다 ;; 당황쓰 

찾아보니까.. A100에서 지원하는 TensorFloat-32 (TF32) 를 사용해서 학습을 시켜야 한다고 한다. 

출처 https://blogs.nvidia.com/blog/2020/05/14/tensorfloat-32-precision-format/

fp32 연산을 가지고 10배 빠르게 학습이 가능하고 fp16 을 사용하는 학습보다 훨씬 안정적으로 가능하다니.. 너무좋잖아? 

근데 또 찾아 보면 TF32 is supported in the NVIDIA Ampere GPU architecture and is enabled by default.

라고 해서 자동으로 enable 되는 것 같은데.. 도대체 어디서 병목이 생기는거지.. 

찾아보니까 cudnn 문제라고한다. 

https://discuss.pytorch.org/t/a100-is-slower-than-1080ti-with-pytorch/124913

 

A100 is slower than 1080ti with pytorch

First, I found out that the A100 supports: cuda 11.0 nvidia driver 450 So, when using the A100, I adjusted the environment as follows. cuda 11.0 cudnn 8005 (I checked by torch.backends.cudnn.version()) nvidia driver 450 (more detailed, 450.119.04) pytorch

discuss.pytorch.org

 

 

Installation Guide :: NVIDIA Deep Learning cuDNN Documentation

The NVIDIA® CUDA® Deep Neural Network library™ (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalizati

docs.nvidia.com

여기서 나와있는대로 cudnn  설치하니까 해결되었다 

https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-linux

반응형
Comments