2022-06-15 19:49:38 +08:00
|
|
|
/*
|
2023-01-12 00:46:43 +08:00
|
|
|
* Copyright (C) 2022-2023 Intel Corporation
|
2022-06-15 19:49:38 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-11-07 21:04:52 +08:00
|
|
|
#include "shared/source/ail/ail_configuration.h"
|
|
|
|
|
2022-06-15 19:49:38 +08:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY Product>
|
2023-02-10 23:05:50 +08:00
|
|
|
inline void AILConfigurationHw<Product>::modifyKernelIfRequired(std::string &kernel) {
|
2022-06-15 19:49:38 +08:00
|
|
|
}
|
|
|
|
|
2023-02-10 23:05:50 +08:00
|
|
|
// To avoid a known oneDNN issue in ZEBin handling,
|
|
|
|
// fall back to legacy (patchtoken) format when dummy kernel used by nGen is detected.
|
|
|
|
// Only this specific kernel with that exact source code will be affected.
|
|
|
|
|
2023-01-12 00:46:43 +08:00
|
|
|
template <PRODUCT_FAMILY Product>
|
2023-03-03 21:23:24 +08:00
|
|
|
inline bool AILConfigurationHw<Product>::isFallbackToPatchtokensRequired(const std::string &kernelSources) {
|
2023-02-10 23:05:50 +08:00
|
|
|
std::string_view dummyKernelSource{"kernel void _(){}"};
|
|
|
|
if (sourcesContain(kernelSources, dummyKernelSource)) {
|
2023-03-03 21:23:24 +08:00
|
|
|
return true;
|
2023-02-10 23:05:50 +08:00
|
|
|
}
|
2023-02-17 23:40:18 +08:00
|
|
|
|
|
|
|
for (const auto &name : {"Resolve",
|
|
|
|
"ArcControlAssist",
|
|
|
|
"ArcControl"}) {
|
|
|
|
if (processName == name) {
|
2023-03-03 21:23:24 +08:00
|
|
|
return true;
|
2023-02-17 23:40:18 +08:00
|
|
|
}
|
|
|
|
}
|
2023-03-03 21:23:24 +08:00
|
|
|
return false;
|
2023-01-12 00:46:43 +08:00
|
|
|
}
|
|
|
|
|
2022-06-15 19:49:38 +08:00
|
|
|
template <PRODUCT_FAMILY Product>
|
|
|
|
inline void AILConfigurationHw<Product>::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) {
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace NEO
|