clvk icon indicating copy to clipboard operation
clvk copied to clipboard

Using OpenCL-static with CLBlast

Open bmanga opened this issue 1 year ago • 3 comments

Hi, I know this is not the officially supported way to run clvk, but I was trying to statically link the library (OpenCL-static) to my executable. Using the pre-compiled spirv from clspv works, but using CLBlast which compiles the kernels at runtime I get the following:

OpenCL compiler error/warning:
clspv: for the --arch option: Cannot find option named ''!

CLBlast: OpenCL error: clBuildProgram: -11

I was wondering if someone had any ideas on where the problem might be. Thanks!

bmanga avatar Jan 26 '24 10:01 bmanga

Can you try to run it with the following env variable set: CLVK_SPIRV_ARCH=spir

rjodinchr avatar Jan 26 '24 11:01 rjodinchr

Hi @rjodinchr thanks for the reply!

Unfortunately the env variable doesn't help....

bmanga avatar Jan 26 '24 13:01 bmanga

I guess you will have to use lldb or gdb to get more information then.

Having a look at m_spirv_arch in https://github.com/kpet/clvk/blob/f1e97767218eb456956b43493cd6833a8806544a/src/device.cpp#L495 or https://github.com/kpet/clvk/blob/f1e97767218eb456956b43493cd6833a8806544a/src/device.cpp#L132 (before and after) might help us understand what is happening.

rjodinchr avatar Jan 26 '24 13:01 rjodinchr