oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
199 stars 87 forks source link

Wrong error code after zeKernelCreate #53

Open jjfumero opened 3 years ago

jjfumero commented 3 years ago

I am getting this error code 0x78000004, after trying to create a SPIRV kernel with the wrong name. The error is not listed here:

https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zecommandlistclose#zekernelcreate

This error code code corresponds to an invalid argument:

ZE_RESULT_ERROR_INVALID_ARGUMENT = 0x78000004

https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zecommandlistclose#_CPPv432ZE_RESULT_ERROR_INVALID_ARGUMENT

However, following the documentation, it should be

ZE_RESULT_ERROR_INVALID_KERNEL_NAME = 0x78000011

https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zecommandlistclose#ze__api_8h_1a3ea791bcf22ddfc1d413579b12c22767ad719a3474cbfc829c6edb4c622e568d5

I am getting this for SPIR-V modules with OpenCL compute.

Some details about the environment:

Level Zero version: 284ccb089184180e34864a9f1e23971d3d736bd8 Platform: Intel(R) HD Graphics 630 [0x591b] OpenCL version: OpenCL C 3.0 Driver: 21.12.19358

jandres742 commented 3 years ago

Under which circumstances you are getting that error?

jjfumero commented 3 years ago

Sorry, I should have described it better. I just updated the description.

I am getting this error after passing the wrong name for an SPIR-V kernel.

Shouldn't I get a ZE_RESULT_ERROR_INVALID_KERNEL_NAME with an error code 0x78000011 in these cases?

jandres742 commented 3 years ago

@jjfumero : You are correct. This is in fact coming from the driver implementation in https://github.com/intel/compute-runtime. Will post fix there and update here once available.

jandres742 commented 3 years ago

Fixed in driver's code, https://github.com/intel/compute-runtime/commit/b510923e256b19e8e54fead1e30d57896d127d94

jjfumero commented 3 years ago

Thank you @jandres742 . I confirm with the latest driver 21.16.19610, it works.