Return correct status when module is not fully linked

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2021-10-13 14:48:01 +00:00
committed by Compute-Runtime-Automation
parent f0d32ed5f7
commit 38eab0e70f
2 changed files with 2 additions and 2 deletions

View File

@@ -574,7 +574,7 @@ ze_result_t ModuleImp::createKernel(const ze_kernel_desc_t *desc,
ze_kernel_handle_t *phFunction) {
ze_result_t res;
if (!isFullyLinked) {
return ZE_RESULT_ERROR_MODULE_BUILD_FAILURE;
return ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED;
}
auto kernel = Kernel::create(productFamily, this, desc, &res);

View File

@@ -986,7 +986,7 @@ HWTEST_F(ModuleLinkingTest, givenNotFullyLinkedModuleWhenCreatingKernelThenError
auto retVal = module.createKernel(nullptr, nullptr);
EXPECT_EQ(ZE_RESULT_ERROR_MODULE_BUILD_FAILURE, retVal);
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED, retVal);
}
using ModulePropertyTest = Test<ModuleFixture>;