polly parallel giving inconsistent results

53 views
Skip to first unread message

Rohan Rayan

unread,
May 4, 2022, 6:25:44 AM5/4/22
to Polly Development
Hello All

I am running a simple matrix multiply program (see attached file).

I am getting inconsistent results when running it with clang and polly with and without parallelization.

With single core:
Command: ./llvm-project/build/bin/clang -O3 -mllvm -polly  matmul.c
Result: sum = 433588338688.000000

With parallelization:
Command: ../llvm-project/build/bin/clang -O3 -mllvm -polly -mllvm -polly-parallel -lgomp -mllvm -polly-num-threads=4 matmul.c
Result: sum = 315474345984.000000


matmul.c

Siddharth Bhat

unread,
May 8, 2022, 11:44:25 PM5/8/22
to Polly Development
Hello,

Thank you for the report. I've pushed a commit here  (https://reviews.llvm.org/D125202), which will take a couple of days to be reviewed. In the meantime,
I suggest running:

Command: ../llvm-project/build/bin/clang -O3 -mllvm --polly-pattern-matching-based-opts=false -mllvm -polly -mllvm -polly-parallel -lgomp -mllvm -polly-num-threads=4 matmul.c
Result: sum = 433588338688.000000

Best,
~Siddharth

Rohan Rayan

unread,
May 9, 2022, 12:39:21 AM5/9/22
to Polly Development
Thanks.

With the command you provided, the results match. Although the runtime performance for this particular application seems to degrade on parallelization.

~Rohan Rayan

Reply all
Reply to author
Forward
0 new messages