Propagate errors in ModuleImp::createKernel

Change-Id: I71612013e27315841103ceaf1de9ea11c1876ac6
Signed-off-by: Jim Snow <jim.m.snow@intel.com>
This commit is contained in:
Jim Snow
2020-05-01 15:39:55 -07:00
parent a5793fc654
commit f0c7f5f5de
2 changed files with 37 additions and 4 deletions

View File

@@ -383,9 +383,14 @@ void ModuleImp::updateBuildLog(NEO::Device *neoDevice) {
ze_result_t ModuleImp::createKernel(const ze_kernel_desc_t *desc,
ze_kernel_handle_t *phFunction) {
ze_result_t res = ZE_RESULT_SUCCESS;
*phFunction = Kernel::create(productFamily, this, desc, &res)->toHandle();
return ZE_RESULT_SUCCESS;
ze_result_t res;
auto kernel = Kernel::create(productFamily, this, desc, &res);
if (res == ZE_RESULT_SUCCESS) {
*phFunction = kernel->toHandle();
}
return res;
}
ze_result_t ModuleImp::getNativeBinary(size_t *pSize, uint8_t *pModuleNativeBinary) {