Evaluating Polybench using PPCG

61 views
Skip to first unread message

Arun T

unread,
Apr 27, 2023, 1:04:58 PM4/27/23
to isl Development
Dear All,

I'm trying to best evaluate Polybench benchmarks using PPCG for CPU, CUDA, and openCL.
I'm using the flag options: --tile,  --target=c or cuda or opencl,  and --openmp from PPCG

Please let me know, if I need to include any other flags for better execution.

Thanks.

Sven Verdoolaege

unread,
Apr 28, 2023, 4:45:44 PM4/28/23
to Arun T, isl Development
On Thu, Apr 27, 2023 at 06:11:43AM -0700, Arun T wrote:
> Dear All,
>
> I'm trying to best evaluate Polybench benchmarks using PPCG for CPU, CUDA,
> and openCL.
> I'm using the flag options: *--tile, * *--target=c or cuda or opencl,* and *--openmp
> *from PPCG

--tile and --openmp are only valid for the "c" target.

Note that you are unlikely to get good performance on the "c" target
since for CPUs, PPCG really only has a basic framework.
It hasn't been optimized in any way and doesn't even have
any specific support for vectorization.

For GPUs, there is a bit of intelligence, but it was based
on GPUs from more than 10 years ago. I have no idea
if the heuristics from back then are any good for more recent GPUs.
To get good performance, you also have to specify appropriate
(program dependent) kernel, grid and block sizes.

skimo

Dmitry N. Mikushin

unread,
Apr 28, 2023, 4:52:45 PM4/28/23
to sven.ver...@gmail.com, Arun T, isl Development
Sven,

I have a related question: how much effort is needed to add support for parallel reduction to PPCG? Reduction is an essential second part of many parallel algorithms, so its absence is often a show stopper.

Kind regards,
Dmitry.


пт, 28 апр. 2023 г. в 22:45, Sven Verdoolaege <sven.ver...@telenet.be>:
--

---
You received this message because you are subscribed to the Google Groups "isl Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isl-developme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isl-development/20230428204542.GJ1774MdfPADPa%40purples.home.

Sven Verdoolaege

unread,
Apr 30, 2023, 3:41:14 PM4/30/23
to Dmitry N. Mikushin, isl Development
On Fri, Apr 28, 2023 at 10:52:31PM +0200, Dmitry N. Mikushin wrote:
> Sven,
>
> I have a related question: how much effort is needed to add support for
> parallel reduction to PPCG?

I'm not sure. What exactly would you like to add to PPCG?

skimo

Dmitry N. Mikushin

unread,
Apr 30, 2023, 5:05:12 PM4/30/23
to sven.ver...@gmail.com, isl Development
> What exactly would you like to add to PPCG?

Currently, PPCG rewrites the SCOP, if it manages to find an equivalent parallel schedule. But parallel reduction is a special idiom, it's not not parallel per se, and needs artificial scratch space to be parallelized. This is how OpenMP or OpenACC can support reduction in their "reduce" clauses. So I'm wondering what could be done to bring PPCG to the same level: let it detect reduction, and let it generate a parallel schedule for it?

D.

вс, 30 апр. 2023 г. в 21:41, Sven Verdoolaege <sven.ver...@telenet.be>:

Sven Verdoolaege

unread,
May 1, 2023, 4:36:17 PM5/1/23
to Dmitry N. Mikushin, isl Development
On Sun, Apr 30, 2023 at 11:04:59PM +0200, Dmitry N. Mikushin wrote:
> > What exactly would you like to add to PPCG?
>
> Currently, PPCG rewrites the SCOP, if it manages to find an equivalent
> parallel schedule. But parallel reduction is a special idiom, it's not not
> parallel per se, and needs artificial scratch space to be parallelized.
> This is how OpenMP or OpenACC can support reduction in their "reduce"
> clauses. So I'm wondering what could be done to bring PPCG to the same
> level: let it detect reduction, and let it generate a parallel schedule for
> it?

In principle, detecting reductions shouldn't be too difficult.
I have some notes about that in the 2015 presentation
"Polyhedral Compilation without Polyhedra".

skimo
Reply all
Reply to author
Forward
0 new messages