Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Fix launching a kernel with a default constructed local access…
…or (#13382) According to [4.7.6.11.1. Interface for local accessors](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_interface_for_local_accessors), passing a default constructed local accessor to a kernel function is allowed, as long as no accesses to the data elements are made. When default constructing a `local_accessor`, it will default construct its `local_accessor_base` https://github.com/intel/llvm/blob/3f841ff1d21bac2601beaf087bc3d09170af6d35/sycl/include/sycl/accessor.hpp#L2803-L2805 leading its `LocalAccessorImplHost` to be constructed with `MDims == 0`. When setting the kernel arguments corresponding to the local accessor, this caused `piKernelSetArg` to be called with `arg_size == 0`, which then causes an error. This PR fixes this by checking if `MDims` would be 0 and then setting an appropriate value.
- Loading branch information