Open MathiasMagnus opened 2 months ago
@MathiasMagnus I do not believe what you are attempting is supported. Why can't the runtime compiler be used?
@b-sumner Because I want to feed C++ for OpenCL to the runtime, and amdclang (like any other Clang-based compiler) has it.
I'm trying to push the ecosystem further.
@MathiasMagnus I appreciate what you're trying to do, but since it's not supported the burden will be on you to properly invoke the LLVM toolchain. The OpenCL runtime use COMgr for online compilation services. If you follow what COMgr does (see https://github.com/ROCm/llvm-project/tree/amd-staging/amd/comgr) you should be able to create correct code objects.
Problem Description
Using all tried releases of Clang (for eg. HIP SDK 5.7.1) a simple saxpy kernel when compiled offline to gfx90c binary and fed to an OpenCL program, it fails to build. The build log upon failure holds:
Using
cl_amd_offline_devices
to manifest a gfx1030 device, it builds as expected.Operating System
Windows 11 Pro (10.0.22631)
CPU
AMD Ryzen 7 4700U with Radeon Graphics
GPU
AMD Radeon VII
ROCm Version
ROCm 5.7.1
ROCm Component
clr
Steps to Reproduce
Take the following kernel:
and compile using some Clang as such:
Feed the binary to a physically present or offline device (using
cl_amd_offline_devices
) for eg.:(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response