pet_loopback and onriginal version of medley/deriche give different results

18 views
Skip to first unread message

Emil Vatai

unread,
Sep 11, 2024, 2:46:40 AM9/11/24
to isl Development
Hello!

While checking correctness of the implementation of my library which uses ISL/PET, I was running my code with polybench, and the medley/deriche benchmark was always failing (giving wrong/different results than the original). As a sanity check, I ran it through PET's `pet_loopback` which is supposed to give the code back (more or less) as is, but the results are different even with pet_loopback, i.e. without any transformations
(-DPOLYBENCH_DUMP_ARRAYS -DSMALL_DATASET)

I didn't have time to investigate it in detail, just wanted to check here first if someone knows about this issue.

Best,
Emil

Sven Verdoolaege

unread,
Sep 11, 2024, 2:01:11 PM9/11/24
to Emil Vatai, isl Development
The default loop iterator names conflict with some variables
in the original code. PPCG takes care to use non-conflicting names,
pet_loopback does not.

skimo

Sven Verdoolaege

unread,
Jun 20, 2026, 6:12:35 AM (7 days ago) Jun 20
to Emil Vatai, isl Development
Now it does.

skimo

Emil Vatai

unread,
Jun 20, 2026, 7:32:38 AM (7 days ago) Jun 20
to sven.ver...@gmail.com, isl Development
Thanks.

I think fixing that in Tadashi was one thing I asked a clanker (AI) to
do and I think it did a decent job:
https://github.com/vatai/tadashi/blob/ef51cd6ad1e534b9662182dc1f2aecabed3b465c/tadashi/src/codegen.c#L501

Ahhh... But I see you use pet_scop_get_ids()... I didn't know about
that! To quote Kintaro Oe: So educational!

Best,
E
--
Emil Vatai

Sven Verdoolaege

unread,
Jun 20, 2026, 7:52:40 AM (7 days ago) Jun 20
to Emil Vatai, isl Development
On Sat, Jun 20, 2026 at 08:34:10PM +0900, Emil Vatai wrote:
> Ahhh... But I see you use pet_scop_get_ids()... I didn't know about
> that! To quote Kintaro Oe: So educational!

I added it for this very purpose...
(even though it was mostly copied from ppcg)

skimo
Reply all
Reply to author
Forward
0 new messages