Skip to content

Instantly share code, notes, and snippets.

@panmari
Created March 16, 2017 19:23
Show Gist options
  • Save panmari/4b495af0c383c26c1c50435d055c05a5 to your computer and use it in GitHub Desktop.
Save panmari/4b495af0c383c26c1c50435d055c05a5 to your computer and use it in GitHub Desktop.
Benchmark for resize nearest neighbor on cpu
# Benchmarks for images with 6 channels.
# Full command line:
# bazel run -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda tensorflow/core/kernels:resize_benchmark_test_gpu -- --benchmarks=..
BEFORE
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 50546710 100 295.6M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9572830 100 1560.7M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64680780 100 231.0M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11350100 100 1316.3M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 50852470 100 293.8M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9727790 100 1535.8M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64771390 100 230.7M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11347250 100 1316.6M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 50900770 100 293.5M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9548240 100 1564.7M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64524110 100 231.5M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11347420 100 1316.6M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 50745770 100 294.4M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9614010 100 1554.0M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64536100 100 231.5M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11353950 100 1315.8M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 50618840 100 295.1M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9637660 100 1550.2M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 65169540 100 229.2M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11350450 100 1316.3M items/s
AFTER
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 46534460 100 321.1M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9637730 100 1550.2M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 63953440 100 233.6M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11497690 100 1299.4M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 47059640 100 317.5M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9777910 100 1527.9M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64035310 100 233.3M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11344160 100 1317.0M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 46869370 100 318.8M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9710400 100 1538.6M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 65130410 100 229.4M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11343520 100 1317.1M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 46730730 100 319.7M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9555730 100 1563.5M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64584740 100 231.3M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11445240 100 1305.4M items/s
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 46744650 100 319.6M items/s
BM_Resize_ResizeNearestNeighbor_gpu_10_499_499 9840420 100 1518.2M items/s
BM_Resize_ResizeBilinear_cpu_10_499_499 64439430 100 231.8M items/s
BM_Resize_ResizeBilinear_gpu_10_499_499 11336210 100 1317.9M items/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment