NullReferenceException
when passing empty ArrayView
s to OpenCL kernel
#1121
Labels
NullReferenceException
when passing empty ArrayView
s to OpenCL kernel
#1121
In ILGPU 1.5.1 on .NET 7, I get a
NullReferenceException
when I try to pass an emptyArrayView
to an OpenCL kernel. Below is a minimal reproducer:This has the following output on my machine:
My use case for this is that I'm passing a
struct
to some GPU kernels which contains a number ofArrayView
s, though not all of them may be set at a given time (e.g., oneArrayView
may point to a valid array one call, but be empty on a subsequent call depending on memory characteristics of the application). I'd like to just be able to set these array views using.Empty
, but I am encountering that exception.Is this something that ILGPU can address, or is this an inherent limitation of OpenCL/CUDA kernels? Thank you to all the maintainers!
Additional notes:
The text was updated successfully, but these errors were encountered: