fancyix

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

Discussion created by fancyix on Aug 22, 2018
Latest reply on Aug 28, 2018 by fancyix

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

LLVM-AMDGPU-Assembler-Extra/s_memrealtime_inline.cl at master · ROCm-Developer-Tools/LLVM-AMDGPU-Assembler-Extra · GitHu…

gatelessgate/equihash.cl at master · zawawawa/gatelessgate · GitHub

But I cannot find a way how they can be compiled.

 

There is some guide:

HIP/samples/2_Cookbook/10_inline_asm at master · ROCm-Developer-Tools/HIP · GitHub

But it's not clear how exactly to compile .cl files with inline asm.

 

There was some discussion about inline asm in OpenCL:

Inline assembly on OpenCL

But I think that's obsolete.

 

P.S. I use amdgpu pro driver. All the articles I found are talking about rocm develop tools. Can I compile with rocm compiler and run it with amdgpu pro driver?

 

Also, if I can transform opencl with inline asm into isa file and then compile isa with pure asm compiler, it will also work for me.

Outcomes