mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Ocloc supports passing hw ip version value to -device arg in the form of major.minor.revision. This change adds support for directly passed value as uint32_t as well. Support added for single and fat binary. Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-7903
30 lines
823 B
C++
30 lines
823 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::getProductConfigFromAcronym(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;
|
|
}
|