Temp

pytorch cuda 11.3๊ณผ cuda 10.2์˜ ์†๋„ ์ฐจ์ด

ju_young 2022. 8. 5. 21:14
728x90
 

The speed of pytorch with cudatoolkit 11.0 is slower than cudatoolkit 10.2 · Issue #47908 · pytorch/pytorch

๐Ÿ› Bug When I update the pytorch to 1.7, the cudatoolkit is updated automaticlly to 11.0, and I find the speed of the same code is slower too much than before. So I change the version of the cudatoo...

github.com

 

์œ„ github issue์—์„œ pytorch cudatoolkit 11.0์ด cudatoolkit 10.2 ๋ณด๋‹ค ๋Š๋ฆฌ๋‹ค๋Š” ์˜๊ฒฌ(?)์ด ๋งŽ์•„์„œ ์ง์ ‘ ์‹คํ—˜ํ•ด๋ณด์•˜๋‹ค.

 

์‹คํ—˜ ํ™˜๊ฒฝ์€ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. (๋” ์ถ”๊ฐ€ํ•  ๊ฒƒ์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€๋กœ...)

 

  • Ubuntu 16.04
  • Quadro RTX 6000
  • NVIDIA Driver Version: 515.65.01
  • torch.backends.cudnn.enabled = True
  • torch.backends.cudnn.benchmark = False

ํƒœ์Šคํฌ๋Š” OCR์ด๊ณ  ์•ฝ 17000์žฅ์˜ ์ด๋ฏธ์ง€๋ฅผ inferenceํ•˜์—ฌ elapsed time์„ ์ธก์ •ํ•˜์˜€๋‹ค.

CUDA 10.2

  • Install

์•„๋ž˜์™€ ๊ฐ™์ด installํ•˜๋ฉด cudatoolkit ๋ฒ„์ „์— ๋งž๊ฒŒ cudnn๋„ ์„ค์น˜๋œ๋‹ค.

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=10.2 -c pytorch
  • conda list์—์„œ ํ™•์ธํ•œ pytorch
pytorch                   1.11.0          py3.8_cuda10.2_cudnn7.6.5_0    pytorch
  • elapsed time: 15m 26s

CUDA 11.3

  • Install
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
  • conda list์—์„œ ํ™•์ธํ•œ pytorch
pytorch                   1.11.0          py3.8_cuda10.2_cudnn7.6.5_0    pytorch
  • elapsed time: 13m 03s

 

๊ฒฐ๋ก : CUDA 10.2๊ฐ€ ์•ฝ 18% ๋” ๋น ๋ฅด๋‹ค.

728x90