Closed fwinter closed 2 years ago
Hi @fwinter,
Your use case looks valid to me. A pointer to null should be okay.
The return code you are getting is ZE_RESULT_ERROR_INVALID_ARGUMENT
. This is being returned from the runtime driver. I assume you are using the compute-runtime GPU driver. Can you move this issue to that github? https://github.com/intel/compute-runtime
@bmyates should we close this since it was moved to driver?
Yep, closing
When I try setting a pointer argument to zero using
zeKernelSetArgumentValue
the call fails with error code0x78000004
.One could argue why would anyone set a pointer argument to a value that's definitely illegal to use? Well, consider a simplified kernel that appears in a stencil kernel in a multi MPI rank job:
Based on the sign of the index
a
the source value comes either from the local grid (a) or an MPI receive buffer (b). In circumstances where there's no off-node communication (a runtime choice) this kernel must still work. In this case I'd passNULL
as value for the last parameter, and I know the kernel executes still correctly since it would never read fromb
. However, Level Zero API seem to not like this and throws the above error.This is how I use it to set the last parameter:
The API call
zeKernelSetArgumentValue
should accept a pointer to NULL, right?