mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 18:25:05 +08:00
fix: Return Invalid Argument given the wrong module used in static link
Related-To: LOCI-4939 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
179abf00de
commit
f901b26222
@@ -585,7 +585,7 @@ inline ze_result_t ModuleImp::initializeTranslationUnit(const ze_module_desc_t *
|
|||||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
if (desc->format != ZE_MODULE_FORMAT_IL_SPIRV) {
|
if (desc->format != ZE_MODULE_FORMAT_IL_SPIRV) {
|
||||||
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
|
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
this->builtFromSPIRv = true;
|
this->builtFromSPIRv = true;
|
||||||
const ze_module_program_exp_desc_t *programExpDesc =
|
const ze_module_program_exp_desc_t *programExpDesc =
|
||||||
|
|||||||
@@ -923,7 +923,7 @@ struct ModuleStaticLinkFixture : public DeviceFixture {
|
|||||||
module->translationUnit.reset(mockTranslationUnit);
|
module->translationUnit.reset(mockTranslationUnit);
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
result = module->initialize(&combinedModuleDesc, neoDevice);
|
result = module->initialize(&combinedModuleDesc, neoDevice);
|
||||||
EXPECT_EQ(result, ZE_RESULT_ERROR_INVALID_ENUMERATION);
|
EXPECT_EQ(result, ZE_RESULT_ERROR_INVALID_ARGUMENT);
|
||||||
module->destroy();
|
module->destroy();
|
||||||
}
|
}
|
||||||
void runExpDescFailureTest() {
|
void runExpDescFailureTest() {
|
||||||
|
|||||||
Reference in New Issue
Block a user