fix: don't return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE from linking module
https://github.com/intel/compute-runtime/issues/692 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
70beb8834d
commit
914a1f980f
|
@ -1421,12 +1421,11 @@ ze_result_t ModuleImp::performDynamicLink(uint32_t numModules,
|
|||
}
|
||||
}
|
||||
if (numPatchedSymbols != moduleId->unresolvedExternalsInfo.size()) {
|
||||
driverHandle->clearErrorDescription();
|
||||
if (functionSymbolExportEnabledCounter == 0) {
|
||||
driverHandle->setErrorDescription("Dynamic Link Not Supported Without Compiler flag %s\n", BuildOptions::enableLibraryCompile.str().c_str());
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Dynamic Link Not Supported Without Compiler flag %s\n", BuildOptions::enableLibraryCompile.str().c_str());
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
driverHandle->clearErrorDescription();
|
||||
return ZE_RESULT_ERROR_MODULE_LINK_FAILURE;
|
||||
}
|
||||
moduleId->copyPatchedSegments(isaSegmentsForPatching);
|
||||
|
|
|
@ -2042,7 +2042,7 @@ TEST_F(ModuleDynamicLinkTests, givenModuleWithUnresolvedSymbolsNotPresentInAnoth
|
|||
std::string emptyString = "";
|
||||
zeDriverGetLastErrorDescription(device->getDriverHandle(), &pStr);
|
||||
EXPECT_NE(0, strcmp(pStr, emptyString.c_str()));
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, res);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_MODULE_LINK_FAILURE, res);
|
||||
size_t buildLogSize;
|
||||
zeModuleBuildLogGetString(dynLinkLog, &buildLogSize, nullptr);
|
||||
EXPECT_GT(static_cast<int>(buildLogSize), 0);
|
||||
|
|
Loading…
Reference in New Issue