Closed aarontcopal2 closed 4 years ago
pInputModule
should point to the either the SPIRV or BIN code of the kernel you want to offload to the GPU, and with format
you indicate the format you are passing. The SPIRV or BIN code is generated, for instance, using clang, as described here https://github.com/KhronosGroup/SPIR/tree/spirv-1.1.
We are planning to release samples that can be used as reference. Please keep an eye on https://github.com/oneapi-src/level-zero-tests, for Level Zero content
Thank you. Could you close the issue when the samples are pushed to the repo?
Sure. Once they are available, I will paste here a link to a sample and we can close it.
https://github.com/oneapi-src/level-zero-tests contains now samples you can use as reference. In your case, please take a look at test_module.cpp
@jandres742 , thanks for the link. You can close the issue :)
To create a Module, you need to pass a module description. (link)
I'm having trouble determining the 3rd and 4th argument. Could someone provide me code samples of ze_module_desc_t for both "ZE_MODULE_FORMAT_IL_SPIRV" and "ZE_MODULE_FORMAT_NATIVE" format.