This is an archive of the discontinued LLVM Phabricator instance.

[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

Repository
rL LLVM

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 ↗(On Diff #157595)

this call is made to warm up the cache

86 ↗(On Diff #157595)

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 ↗(On Diff #157595)

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

MicroBenchmarks/ImageProcessing/Dilate/main.cpp
86 ↗(On Diff #157595)

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.