Page MenuHomePhabricator

[test-suite] Added Image Processing Kernels Using Benchmark Library: Dilate Kernel
ClosedPublic

Authored by proton on Jul 26 2018, 3:39 PM.

Details

Summary

Added Dilate Kernel to Image processing using benchmark library.

Runtime:

Without Polly

Benchmark Time CPU Iterations

BENCHMARK_DILATE/128/128 142 us 142 us 4942
BENCHMARK_DILATE/256/256 568 us 568 us 1064
BENCHMARK_DILATE/512/512 2334 us 2334 us 290
BENCHMARK_DILATE/1024/1024 9745 us 9745 us 72

With Polly

Benchmark Time CPU Iterations

BENCHMARK_DILATE/128/128 40 us 40 us 13423
BENCHMARK_DILATE/256/256 184 us 184 us 3616
BENCHMARK_DILATE/512/512 1073 us 1073 us 600
BENCHMARK_DILATE/1024/1024 8595 us 8595 us 80

Note: This differential should be applied after D49339 (D49339 contains common function required like readImage, writeImage).

Diff Detail

Event Timeline

proton created this revision.Jul 26 2018, 3:39 PM
proton added inline comments.Jul 26 2018, 3:47 PM
MicroBenchmarks/ImageProcessing/Dilate/main.cpp
79

this call is made to warm up the cache

86

Using the output image so that the "dilateKernel" calls above are not optimized out. This is is always false thought because we never pass state.range(0) as 20.

Meinersbur added inline comments.Jul 26 2018, 7:58 PM
MicroBenchmarks/ImageProcessing/Dilate/dilateKernel.cpp
14–16

Can you change the file type to C and use C99 VLA parameters here?

MicroBenchmarks/ImageProcessing/Dilate/main.cpp
86

Could you add this as a comment into the source file?

proton updated this revision to Diff 157727.Jul 27 2018, 11:45 AM

made changes requested by @Meinersbur

proton updated this revision to Diff 157728.Jul 27 2018, 11:46 AM
proton updated this revision to Diff 157856.Jul 28 2018, 7:09 AM

reverted back to int *arr from int (*arr)[][].

This revision is now accepted and ready to land.Aug 9 2018, 11:58 AM
This revision was automatically updated to reflect the committed changes.