2022-06-15 11:49:38 +00:00
|
|
|
/*
|
2024-02-07 16:36:04 +00:00
|
|
|
* Copyright (C) 2022-2024 Intel Corporation
|
2022-06-15 11:49:38 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-11-07 13:04:52 +00:00
|
|
|
#include "shared/source/ail/ail_configuration.h"
|
|
|
|
|
2022-06-15 11:49:38 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2023-11-30 13:33:54 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline void AILConfigurationHw<product>::modifyKernelIfRequired(std::string &kernel) {
|
2022-06-15 11:49:38 +00:00
|
|
|
}
|
|
|
|
|
2023-02-10 15:05:50 +00: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-11-30 13:33:54 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline bool AILConfigurationHw<product>::isFallbackToPatchtokensRequired(const std::string &kernelSources) {
|
2023-02-10 15:05:50 +00:00
|
|
|
std::string_view dummyKernelSource{"kernel void _(){}"};
|
|
|
|
if (sourcesContain(kernelSources, dummyKernelSource)) {
|
2023-03-03 13:23:24 +00:00
|
|
|
return true;
|
2023-02-10 15:05:50 +00:00
|
|
|
}
|
2023-02-17 15:40:18 +00:00
|
|
|
|
|
|
|
for (const auto &name : {"Resolve",
|
|
|
|
"ArcControlAssist",
|
|
|
|
"ArcControl"}) {
|
|
|
|
if (processName == name) {
|
2023-03-03 13:23:24 +00:00
|
|
|
return true;
|
2023-02-17 15:40:18 +00:00
|
|
|
}
|
|
|
|
}
|
2023-03-03 13:23:24 +00:00
|
|
|
return false;
|
2023-01-11 16:46:43 +00:00
|
|
|
}
|
|
|
|
|
2023-11-30 13:33:54 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline void AILConfigurationHw<product>::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) {
|
2022-06-15 11:49:38 +00:00
|
|
|
}
|
|
|
|
|
2023-11-30 13:33:54 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline bool AILConfigurationHw<product>::isContextSyncFlagRequired() {
|
2023-10-14 11:32:40 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-06-18 10:14:25 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline bool AILConfigurationHw<product>::isBufferPoolEnabled() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-11-30 13:33:54 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline bool AILConfigurationHw<product>::useLegacyValidationLogic() {
|
2023-10-18 23:43:21 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-02-07 16:36:04 +00:00
|
|
|
template <PRODUCT_FAMILY product>
|
|
|
|
inline bool AILConfigurationHw<product>::forceRcs() {
|
|
|
|
return shouldForceRcs;
|
|
|
|
}
|
|
|
|
|
2022-06-15 11:49:38 +00:00
|
|
|
} // namespace NEO
|