mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: select target device compatible binary from fatbinary
removes recompilation from IR step when fatbinary contains compatible devices binaries Resolves: NEO-14300,GSD-10568 Signed-off-by: Aleksandra Nizio <aleksandra.nizio@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7a97b98cfe
commit
4a9b918a85
@@ -344,3 +344,41 @@ AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigFromAcronym(const std::
|
||||
}
|
||||
return AOT::UNKNOWN_ISA;
|
||||
}
|
||||
|
||||
std::vector<std::string> ProductConfigHelper::getCompatibilityFallbackProductAbbreviations(const std::string &requestedProductAbbreviation) {
|
||||
std::vector<std::string> result;
|
||||
|
||||
AOT::PRODUCT_CONFIG requestedConfig = AOT::PRODUCT_CONFIG::UNKNOWN_ISA;
|
||||
for (const auto &acronymEntry : AOT::deviceAcronyms) {
|
||||
if (acronymEntry.first == requestedProductAbbreviation ||
|
||||
acronymEntry.first.rfind(requestedProductAbbreviation + "-", 0) == 0) {
|
||||
requestedConfig = acronymEntry.second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (requestedConfig == AOT::PRODUCT_CONFIG::UNKNOWN_ISA) {
|
||||
return result;
|
||||
}
|
||||
|
||||
for (const auto &compatibilityEntry : AOT::compatibilityMapping) {
|
||||
bool contains = std::find(compatibilityEntry.second.begin(),
|
||||
compatibilityEntry.second.end(),
|
||||
requestedConfig) != compatibilityEntry.second.end();
|
||||
if (!contains) {
|
||||
continue;
|
||||
}
|
||||
for (const auto &acronymEntry : AOT::deviceAcronyms) {
|
||||
if (acronymEntry.second == compatibilityEntry.first) {
|
||||
std::string name = acronymEntry.first;
|
||||
if (auto pos = name.find('-'); pos != std::string::npos) {
|
||||
name = name.substr(0, pos);
|
||||
}
|
||||
if (std::find(result.begin(), result.end(), name) == result.end()) {
|
||||
result.push_back(name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ struct ProductConfigHelper {
|
||||
static NEO::ConstStringRef getAcronymFromARelease(AOT::RELEASE release);
|
||||
static uint32_t getProductConfigFromVersionValue(const std::string &device);
|
||||
static AOT::PRODUCT_CONFIG getProductConfigFromAcronym(const std::string &device);
|
||||
static std::vector<std::string> getCompatibilityFallbackProductAbbreviations(const std::string &requestedProductAbbreviation);
|
||||
|
||||
static bool compareConfigs(DeviceAotInfo deviceAotInfo0, DeviceAotInfo deviceAotInfo1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user