GPU code generation error

33 views
Skip to first unread message

Rohan Rayan

unread,
May 2, 2022, 11:39:23 PM5/2/22
to Polly Development
Hello All

I am trying to get the code generation working for the GPU using poly-ACC.

I have successfully installed polly and clang and my machine also has CUDA. Unfortunately, while trying to compile, I get the following error:

Compile Command: ./llvm-project/build/bin/clang -O3 -mllvm -polly -mllvm -polly-target=gpu test.c
Error: fatal error: error in backend: Option -polly-target=gpu not supported for NPM

Does anyone know how to fix this? 

Thanks in advance

Rohan Rayan

Michael Kruse

unread,
May 3, 2022, 12:32:15 PM5/3/22
to Rohan Rayan, Polly Development
Use the legacy pass manager with the -fno-legacy-pass-manager flag.

Michael
> --
> You received this message because you are subscribed to the Google Groups "Polly Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to polly-dev+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/25f11d57-49eb-4cb8-b87c-6be42abf36bdn%40googlegroups.com.



--
Tardyzentrismus verboten!

Rohan Rayan

unread,
May 4, 2022, 1:12:40 AM5/4/22
to Polly Development
Hello Michael 

Thanks for the reply but unfortunately I still get the same error. I tried to use both -fno-legacy-pass-manager and -legacy-pass-manager but both fail.

Command: ../llvm-project/build/bin/clang -O3 -fno-legacy-pass-manager -mllvm -polly -mllvm -polly-target=gpu test.c
Error: fatal error: error in backend: Option -polly-target=gpu not supported for NPM

The version of clang that I am currently using is:

clang version 15.0.0 (https://github.com/llvm/llvm-project.git 6cfcfbdc957fcd919cf27d5afe688dc12da43bd5)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: ../llvm-project/build/bin


Should I revert to a previous commit and compile clang and polly again so that I don't face these issues?

Thanks once again.

Michael Kruse

unread,
May 9, 2022, 6:16:12 PM5/9/22
to Rohan Rayan, Polly Development
I am afraid support for the legacy pass manager has been removed in
Clang (https://reviews.llvm.org/D123609). You could still emit the
LLVM-IR and pass it to `opt -enable-new-pm=0`.

Michael
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/625767b1-2a2d-4c53-ac08-15022c0385fcn%40googlegroups.com.



--
Tardyzentrismus verboten!
Reply all
Reply to author
Forward
0 new messages