This is the test code for cuda:
# test_cuda.py
import torch
from datetime import datetime

for i in range(10):
    x = torch.randn(10, 10, 10, 10)
    t1 = datetime.now()
    x.cuda()
    print(i, datetime.now() - t1)

and the result for my compiled torch on cuda 9.1.85 is:
Found GPU0 GeForce 920MX which is of cuda capability 5.0.
    PyTorch no longer supports this GPU because it is too old.
    
  warnings.warn(old_gpu_warn % (d, name, major, capability[1]))
0 0:00:02.086585
1 0:00:00.000071
2 0:00:00.000053
3 0:00:00.000051
4 0:00:00.000051
5 0:00:00.000052
6 0:00:00.000065
7 0:00:00.000052
8 0:00:00.000051
9 0:00:00.000052

but same code for cpu:
for i in range(10):
    x = torch.randn(10, 10, 10, 10)
    t1 = datetime.now()
    #x.cuda()
    print(i, datetime.now() - t1)

gives me faster result:
0 0:00:00.000001
1 0:00:00.000001
2 0:00:00.000001
3 0:00:00.000001
4 0:00:00.000001
5 0:00:00.000003
6 0:00:00.000004
7 0:00:00.000004
8 0:00:00.000005
9 0:00:00.000004

But as i said i’m not relying on this test code, actually i’ve run some actual codes for CNN or GANs which are faster on cpu on my system.