OpenCL-Docs icon indicating copy to clipboard operation
OpenCL-Docs copied to clipboard

Layout of structures used as kernel arguments

Open kpet opened this issue 1 year ago • 1 comments

The OpenCL specification does not currently define how structures used as kernel arguments have to be laid out in memory. Most applications that make use of structures as kernel arguments rely on their layout being identical on the host and device, which nothing guarantees. These applications work "by accident".

Other APIs, such as Vulkan, require interface structures be explicitly laid out using decorations in SPIR-V modules.

How should OpenCL solve this issue? At the bare minimum we should add a warning to the spec.

kpet avatar Feb 20 '24 17:02 kpet

Related to #10 and #11

kpet avatar Feb 20 '24 17:02 kpet