[PATCH] D47675: [test-suite][RFC] Using Google Benchmark Library on Harris Kernel

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 09:02:18 PDT 2018


Meinersbur added a comment.

In https://reviews.llvm.org/D47675#1130720, @proton wrote:

> In https://reviews.llvm.org/D47675#1129087, @Meinersbur wrote:
>
> > Looks great. Did you do a performance comparison with/without Polly?
>
>
> `Polly + O3` and `only O3` are taking the same time. It seems like before code reaches Polly, It is already heavily optimized at `O3` and Polly cannot find any further optimization possible on it even though it is in its SCoP.


How long is a single run with `O3`?

>> [suggestion] Even though Google Benchmark by default does not run kernels in multiple threads, it might be a good idea to prepare for it. That is, no global shared `img` array.
> 
> Updated.
>  I still have to keep an extra global array (other than the image) to copy the final output to. I couldn't modify the original image array as it will affect the input of other threads.

It still writes to the target array in parallel without locking.

I suggest to call `harrisKernel` once more only for the correctness check,.

>> [comment] Is there are a reason why the `init.cpp` and `main.cpp` are separate files?
> 
>   `init.cpp` have image initialization and print function which can be used on other image processing kernels as well, So I kept it in a separate file.

If it is supposed to be a shared resource, it shouldn't be in the harris directory.


https://reviews.llvm.org/D47675





More information about the llvm-commits mailing list