You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR #250 should start a discussion about a potential change to run OpenCL kernels. Demo / testing function to compile shaders uses glslangValidator to compile GLSL into SPIR-V. Similar to this https://github.com/google/clspv exists to compile OpenCL kernels into SPIR-V. So the examples from the documentation can be rewritten as
The code above only changed glslangValidator in compileSource to clspv and shader is written in OpenCL C. It prints as expected.
107, 84, 84,
107, 168, 168,
Currently kcompute hard-codes the entry point to main. The change I had to made to get the above example working was changing main to foo. The reason for this is that OpenCL does not allow a kernel to be named main:
The question now could we change the default? One idea could be to choose a different hard-coded name, e.g. entry_point. Or more flexible, allow to specify an entry_pointhere either by adding another parameter or create a small class wrapping the entry point name and the binary.
The text was updated successfully, but these errors were encountered:
The PR #250 should start a discussion about a potential change to run OpenCL kernels. Demo / testing function to compile shaders uses
glslangValidator
to compile GLSL into SPIR-V. Similar to this https://github.com/google/clspv exists to compile OpenCL kernels into SPIR-V. So the examples from the documentation can be rewritten asThe code above only changed
glslangValidator
incompileSource
toclspv
andshader
is written in OpenCL C. It prints as expected.Currently kcompute hard-codes the entry point to
main
. The change I had to made to get the above example working was changingmain
tofoo
. The reason for this is that OpenCL does not allow a kernel to be namedmain
:The question now could we change the default? One idea could be to choose a different hard-coded name, e.g.
entry_point
. Or more flexible, allow to specify anentry_point
here either by adding another parameter or create a small class wrapping the entry point name and the binary.The text was updated successfully, but these errors were encountered: