ROCm / aomp

AOMP is an open source Clang/LLVM based compiler with added support for the OpenMP® API on Radeon™ GPUs. Use this repository for releases, issues, documentation, packaging, and examples.
https://github.com/ROCm/aomp
Apache License 2.0
206 stars 47 forks source link

[Issue]: Disassemble Flang Openmp Offloading #1119

Open Luigi-Crisci opened 1 month ago

Luigi-Crisci commented 1 month ago

Problem Description

Hi, This is more of a question than an issue. Is there a way to disassemble the generated amdcgn code when compiling a fortran openmp program with target directives? Currently, I am doing a kind of trick: generating the assembly with -S and then manually extracting the amdcgn from the .Lllvm.embedded.object string inside.

Operating System

Ubuntu 22.04

CPU

AMD EPYC 9654 96-Core Processor

GPU

AMD MI300X

ROCm Version

ROCm 6.2.0

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

ppanchad-amd commented 3 weeks ago

Hi @Luigi-Crisci. Internal ticket is created it assist with your question. Thanks!

zichguan-amd commented 2 weeks ago

Hi @Luigi-Crisci, you can also get the assembly by adding the -save-temps flag to save intermediate compilation results and look for *-openmp-amdgcn-amd-amdhsa.s file. It will contain more information than just the kernel assembly. Hope it helps.