Files
compute-runtime/shared/source/ail/ail_configuration.cpp
Kacper Nowak d2a2656caa fix(zebin): Enforce fallback to CTNI on TGL/ICL for nGEN dummy kernel
For TGL and ICL platforms - if on clCreateProgramWithSource()
call we detect a nGen dummy kernel usage - enforce fallback to the
patchtokens format (only for this kernel).
- corrected naming
- minor ULTs refactor (less dependencies).
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-01-13 14:36:56 +01:00

28 lines
717 B
C++

/*
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/ail/ail_configuration.h"
#include "shared/source/helpers/hash.h"
#include "shared/source/helpers/hw_info.h"
#include <map>
#include <string>
#include <string_view>
namespace NEO {
bool AILConfiguration::isKernelHashCorrect(const std::string &kernelsSources, uint64_t expectedHash) const {
const auto hash = Hash::hash(kernelsSources.c_str(), kernelsSources.length());
return hash == expectedHash;
}
bool AILConfiguration::sourcesContain(const std::string &sources, std::string_view contentToFind) const {
return (sources.find(contentToFind) != std::string::npos);
}
} // namespace NEO