의미 그대로 cudnn의 benchmark를 통해 최적의 backend 연산을 찾는 flag를 true로 하겠단 의미.

CNN에서 대부분의 연산을 차지하는 convolution의 경우, 아래 사진의(출처의 두번째 링크) 지원하는 연산 중 최적의 알고리즘을 찾아 적용한다.

cf) 확실한 것은 아니지만 아마 이 벤치마크는 모델이 상수처럼 작동할 때 최적의 연산을 찾을 수 있을 것이다. 예를 들어서 입력크기가 고정되어 모델이 static하게 작동한다면 이 flag가 유효하겠지만, 
입력크기가 다양하거나 또는 dynamic한 연산이 모델의 fowarding에 포함된 경우는 큰 효과를 보지 못할 수도 있을 것같다. 

출처 : https://discuss.pytorch.org/t/why-does-winograd-algorithm-speedup-convolution-given-that-mul-and-add-cost-the-same-clock-cycles-on-gpu/89993/4

https://docs.nvidia.com/deeplearning/cudnn/developer-guide/index.html#tensor-ops-conv-functions-supported-algos

https://discuss.pytorch.org/t/what-does-torch-backends-cudnn-benchmark-do/5936

 

'Deep Learning > pytorch' 카테고리의 다른 글

[pytorch] save pytorch model  (0) 2021.09.15
[Pytorch] yolo to pytorch(0)  (0) 2021.05.17

+ Recent posts