mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
refactor: remove platform type string
this property is no longer needed as we compile kernels per product family Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fd16fee707
commit
58b443ecf1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -425,12 +425,6 @@ std::string &OfflineCompiler::getBuildLog() {
|
||||
return buildLog;
|
||||
}
|
||||
|
||||
void OfflineCompiler::setFamilyType() {
|
||||
familyNameWithType.clear();
|
||||
familyNameWithType.append(familyName[hwInfo.platform.eRenderCoreFamily]);
|
||||
familyNameWithType.append(hwInfo.capabilityTable.platformType);
|
||||
}
|
||||
|
||||
int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceName, int deviceId) {
|
||||
std::vector<PRODUCT_FAMILY> allSupportedProduct{ALL_SUPPORTED_PRODUCT_FAMILIES};
|
||||
std::transform(deviceName.begin(), deviceName.end(), deviceName.begin(), ::tolower);
|
||||
@@ -448,7 +442,7 @@ int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceNam
|
||||
setHwInfoValuesFromConfig(config, hwInfo);
|
||||
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
|
||||
|
||||
setFamilyType();
|
||||
productFamilyName = hardwarePrefix[hwInfo.platform.eProductFamily];
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -474,7 +468,7 @@ int OfflineCompiler::initHardwareInfoForProductConfig(std::string deviceName) {
|
||||
hwInfo.platform.usRevId = revisionId;
|
||||
}
|
||||
deviceConfig = productConfig;
|
||||
setFamilyType();
|
||||
productFamilyName = hardwarePrefix[hwInfo.platform.eProductFamily];
|
||||
return SUCCESS;
|
||||
}
|
||||
argHelper->printf("Could not determine target based on product config: %s\n", deviceName.c_str());
|
||||
@@ -831,8 +825,8 @@ std::string OfflineCompiler::parseBinAsCharArray(uint8_t *binary, size_t size, s
|
||||
// Convert binary to cpp
|
||||
out << "#include <cstddef>\n";
|
||||
out << "#include <cstdint>\n\n";
|
||||
out << "size_t " << builtinName << "BinarySize_" << familyNameWithType << " = " << size << ";\n";
|
||||
out << "uint32_t " << builtinName << "Binary_" << familyNameWithType << "[" << (size + 3) / 4 << "] = {"
|
||||
out << "size_t " << builtinName << "BinarySize_" << productFamilyName << " = " << size << ";\n";
|
||||
out << "uint32_t " << builtinName << "Binary_" << productFamilyName << "[" << (size + 3) / 4 << "] = {"
|
||||
<< std::endl
|
||||
<< " ";
|
||||
|
||||
@@ -1121,9 +1115,9 @@ void OfflineCompiler::writeOutAllFiles() {
|
||||
}
|
||||
} else {
|
||||
if (outputFile.empty()) {
|
||||
fileBase = fileTrunk + "_" + familyNameWithType;
|
||||
fileBase = fileTrunk + "_" + productFamilyName;
|
||||
} else {
|
||||
fileBase = outputFile + "_" + familyNameWithType;
|
||||
fileBase = outputFile + "_" + productFamilyName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -98,7 +98,6 @@ All supported acronyms: %s.
|
||||
protected:
|
||||
OfflineCompiler();
|
||||
|
||||
void setFamilyType();
|
||||
int initHardwareInfo(std::string deviceName);
|
||||
int initHardwareInfoForProductConfig(std::string deviceName);
|
||||
int initHardwareInfoForDeprecatedAcronyms(std::string deviceName, int deviceId);
|
||||
@@ -134,7 +133,7 @@ All supported acronyms: %s.
|
||||
|
||||
AOT::PRODUCT_CONFIG deviceConfig = {};
|
||||
std::string deviceName;
|
||||
std::string familyNameWithType;
|
||||
std::string productFamilyName;
|
||||
std::string inputFile;
|
||||
std::string outputFile;
|
||||
std::string outputDirectory;
|
||||
|
||||
Reference in New Issue
Block a user