Add ail for FAHBench on DG2

Add missing synchronization in the FAHBench kernel
which caused hang on DG2.

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6946
This commit is contained in:
Kamil Kopryk
2022-06-15 11:49:38 +00:00
committed by Compute-Runtime-Automation
parent f1bf6c2a7e
commit d308df254c
20 changed files with 391 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,41 +7,18 @@
#include "shared/source/ail/ail_configuration.h"
#include <map>
#include "shared/source/helpers/hash.h"
#include <string>
#include <string_view>
namespace NEO {
/*
* fp64 support is unavailable on some Intel GPUs, and the SW emulation in IGC should not be enabled by default.
* For Blender, fp64 is not performance-critical - SW emulation is good enough for the application to be usable
* (some versions would not function correctly without it).
*
*/
std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blender", {AILEnumeration::ENABLE_FP64}}};
AILConfiguration *ailConfigurationTable[IGFX_MAX_PRODUCT] = {};
AILConfiguration *AILConfiguration::get(PRODUCT_FAMILY productFamily) {
return ailConfigurationTable[productFamily];
bool AILConfiguration::isKernelHashCorrect(const std::string &kernelsSources, uint64_t expectedHash) const {
const auto hash = Hash::hash(kernelsSources.c_str(), kernelsSources.length());
return hash == expectedHash;
}
void AILConfiguration::apply(RuntimeCapabilityTable &runtimeCapabilityTable) {
auto search = applicationMap.find(processName);
if (search != applicationMap.end()) {
for (size_t i = 0; i < search->second.size(); ++i) {
switch (search->second[i]) {
case AILEnumeration::ENABLE_FP64:
runtimeCapabilityTable.ftrSupportsFP64 = true;
break;
default:
break;
}
}
}
applyExt(runtimeCapabilityTable);
bool AILConfiguration::sourcesContainKernel(const std::string &kernelsSources, std::string_view kernelName) const {
return (kernelsSources.find(kernelName) != std::string::npos);
}
} // namespace NEO
} // namespace NEO