pytorch
d1496183 - Fix cuDnn build error with CC3.0 platform(#25820) (#25825)

Commit
5 years ago
Fix cuDnn build error with CC3.0 platform(#25820) (#25825) Summary: __ldg is only available for CC3.5 and above, add default implementation for CC3.0 platform. This PR along with jcooky's PR of https://github.com/jcooky/pytorch/commit/ecdf4564d44835b3b2ffd18e286ad7e549231a14. make the pytorch master HEAD build and runs properly for CC3.0 platform(such as Retina MacBook Pro of Late 2013). I test the mnist example from pytorch/examples with the wheel built, the test accuracy ends with 99% after 10 Epochs with GT 750M CC3.0 platform. CC3.0 platform decrease training time into about 1/5 of its cpu counterpart. ``` (pytorch) SamuelFdeMBP:mnist sfeng$ pip list | grep torch pytorch-sphinx-theme 0.0.24 /Users/sfeng/GH/pytorch_110/docs/src/pytorch-sphinx-theme torch 1.3.0a0+a332583 torchvision 0.5.0a0+0bd7080 (pytorch) SamuelFdeMBP:mnist sfeng$ date && time python main.py && date 日 9 8 07:17:38 CST 2019 /Users/sfeng/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/cuda/__init__.py:132: UserWarning: Found GPU0 GeForce GT 750M which is of cuda capability 3.0. PyTorch no longer supports this GPU because it is too old. The minimum cuda capability that we support is 3.5. warnings.warn(old_gpu_warn % (d, name, major, capability[1])) Train Epoch: 1 [0/60000 (0%)] Loss: 2.300039 ...... Train Epoch: 10 [59520/60000 (99%)] Loss: 0.007440 Test set: Average loss: 0.0322, Accuracy: 9895/10000 (99%) real 2m39.962s user 4m13.625s sys 0m9.672s 日 9 8 07:20:18 CST 2019 (pytorch) SamuelFdeMBP:mnist sfeng$ date && time python main.py --no-cuda && date 日 9 8 07:20:40 CST 2019 Train Epoch: 1 [0/60000 (0%)] Loss: 2.300039 Train Epoch: 1 [640/60000 (1%)] Loss: 2.213470 Train Epoch: 1 [1280/60000 (2%)] Loss: 2.170460 ...... Train Epoch: 10 [58880/60000 (98%)] Loss: 0.005681 Train Epoch: 10 [59520/60000 (99%)] Loss: 0.007686 Test set: Average loss: 0.0319, Accuracy: 9894/10000 (99%) real 12m6.604s user 75m53.129s sys 3m41.744s 日 9 8 07:32:47 CST 2019 ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/25825 Differential Revision: D17252176 Pulled By: soumith fbshipit-source-id: 70bf84ae6380be86b56344b161a52fb06a53a1b2
Author
Parents
Loading