I want to use tensorcore in the chain to speed up my learning.
The environment is CUDA 9.0, cuDNN 7.2, chain 4.2, cupy 4.2 GPU:TITANV
The network is ResNet. (set to float16)
If you perform learning under these conditions, you will receive the following error:
UserWarning: The best algo of conv fwd light not be selected due to rack of workspace size
UserWarning: The best algo of conv bwd data light not selected due to rack of workspace size
UserWarning: The best algo of conv bwd filter light not selected due to rack of workspace size
What is the workspace size that this error refers to?
Is the tensorcore working properly?
The processing time is a little faster when tensorcore is turned off.
The result was the same when I changed the batch size.
When using the Convolution algorithm on CuDNN, we temporarily secure GPU memory = workspace size, but there is a high possibility that this size is insufficient.
Solution: Add the following code to the program:
ws_size=256*1024*1024
chain.cuda.set_max_workspace_size(ws_size)
Reference URL
https://github.com/chainer/chainer/issues/3922
© 2024 OneMinuteCode. All rights reserved.