Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile .cl file that contains inline assembly for GCN cards?

There are some examples of inline assembly inside .cl files:

  • Example #1
  • Example #2

But I cannot find the way they can be compiled.

ROCM has this guide.

It seems that you can just export the env that points to ROCm's OpenCL and build your project as usual.

I wonder if that can automatically handle inline ASM.

I use AMDGPU pro driver.

Can I compile with a ROCm compiler and run it with an AMDGPU pro driver?

Also, if I can transform OpenCL with inline ASM into an ISA file and then compile ISA with a pure ASM compiler, it will also work for me.

like image 343
user1200759 Avatar asked Nov 26 '25 11:11

user1200759


1 Answers

You need the ROCm Runtime (driver) to compile and run it.
AMDGPU Pro is not supporting assembly.

like image 53
Boris Ivanov Avatar answered Dec 01 '25 11:12

Boris Ivanov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!