Skip to content

Instantly share code, notes, and snippets.

@zou3519
Last active September 18, 2017 15:04
Show Gist options
  • Save zou3519/6de82f81438de1ea136658b9e9b2ced3 to your computer and use it in GitHub Desktop.
Save zou3519/6de82f81438de1ea136658b9e9b2ced3 to your computer and use it in GitHub Desktop.
[pytorch] GridSampler CUDNN vs THCUNN perf comparision
Testing small sizes
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(10, 5, 20, 20, 15, 15, 5, 5)
Running CUDNN benchmark
2.23145103455
Running THCUNN benchmark
0.0197968482971
Testing small sizes, big N
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(500, 5, 20, 20, 15, 15, 5, 5)
Running CUDNN benchmark
0.116818904877
Running CUDA-only benchmark
0.142958879471
Testing large sizes
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(50, 10, 100, 100, 100, 100, 5, 5)
Running CUDNN benchmark
0.544181108475
Running THCUNN benchmark
1.28313684464
Testing large sizes, small C
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(50, 5, 100, 100, 100, 100, 5, 5)
Running CUDNN benchmark
0.306521892548
Running THCUNN benchmark
0.638033866882
Testing large N
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(500, 10, 50, 50, 50, 50, 5, 5)
Running CUDNN benchmark
1.71687316895
Running THCUNN benchmark
3.52149200439
Testing large C
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(50, 100, 50, 50, 50, 50, 5, 5)
Running CUDNN benchmark
1.17930197716
Running THCUNN benchmark
2.63836789131
Testing large input
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(50, 10, 500, 500, 80, 80, 5, 5)
Running CUDNN benchmark
11.2164309025
Running THCUNN benchmark
11.1861069202
Testing large output
# benchmark_shape(N, C, IH, IW, H, W, nrand, nrep)
# benchmark_shape(50, 10, 80, 80, 500, 500, 5, 5)
Running CUDNN benchmark
6.22860598564
Running THCUNN benchmark
25.8513329029
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment