llvm / llvm/Polygeist

How to run PolyBench/C benchmarks with polyhedral pluto optimization using Polygeist?

Open
#385 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
624
Forks
170
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm trying to run PolyBench/C benchmarks with polyhedral pluto optimization using Polygeist, but I cannot succeed.
I used the earlier script at https://github.com/wsmoses/Polygeist-Script/blob/main/polybench-c-4.2.1-beta/run.sh as reference.

I used the options as below and not able to proceed with polymer-opt:
`clang -c -O3 ./utilities/polybench.c -o ./utilities/polybench.o -DEXTRALARGE_DATASET -DPOLYBENCH_TIME`

`clang -I ./utilities/ ./linear-algebra/blas/syr2k/syr2k.c -E -DEXTRALARGE_DATASET -DPOLYBENCH_TIME > ./syr2k.c`

`cgeist ./syr2k.c -S -o ./syr2k.mlir`

`polymer-opt -allow-unregistered-dialect -reg2mem -insert-redundant-load -extract-scop-stmt -canonicalize -pluto-opt="dump-clast-after-pluto=syr2k.cloog" -canonicalize ./syr2k.mlir`

The error from 'polymer-opt':
./syr2k.mlir:10:73: error: invalid memref element type
llvm.mlir.global external @stderr() {addr_space = 0 : i32} : memref>

It would be helpful, if some guide me with right set of options.

Thanks
Arun T

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced PolyBench/C run.sh script and compare its preprocessing and polymer-opt options with the commands for linear-algebra/blas/syr2k/syr2k.c. Inspect syr2k.mlir around line 10 and the generated syr2k.cloog output while tracing the invalid memref element type. Done means identifying a supported command sequence that processes the benchmark without the polymer-opt error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.