mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 20:39:56 +08:00
This commit is to introduce optimizations in ocloc when building targets for release and family. Instead of building fatbinary after all available targets in the RTL ID table, we introduce optimizations when there is an acronym available for the platform in the DEVICE table, we limit to them only. Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-7582
30 lines
822 B
C++
30 lines
822 B
C++
/*
|
|
* Copyright (C) 2022-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/helpers/product_config_helper.h"
|
|
|
|
#include "platforms.h"
|
|
|
|
#include <algorithm>
|
|
|
|
void ProductConfigHelper::initialize() {
|
|
for (auto &device : deviceAotInfo) {
|
|
for (const auto &[acronym, value] : AOT::deviceAcronyms) {
|
|
if (value == device.aotConfig.value) {
|
|
device.deviceAcronyms.push_back(NEO::ConstStringRef(acronym));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigForAcronym(const std::string &device) {
|
|
auto it = std::find_if(AOT::deviceAcronyms.begin(), AOT::deviceAcronyms.end(), findMapAcronymWithoutDash(device));
|
|
if (it == AOT::deviceAcronyms.end())
|
|
return AOT::UNKNOWN_ISA;
|
|
return it->second;
|
|
}
|