fix: extend cache hash with compiler commit sha, lib size and mtime

Related-To: NEO-4262

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
This commit is contained in:
Kacper Kasper
2023-08-21 12:00:06 +00:00
committed by Compute-Runtime-Automation
parent d49190f4ae
commit 991febcdf4
35 changed files with 240 additions and 26 deletions

View File

@@ -34,12 +34,15 @@ int MockProgram::getInternalOptionsCalled = 0;
std::string MockProgram::getCachedFileName() const {
CompilerCache cache(CompilerCacheConfig{});
std::string igcRevision = "0001";
size_t igcLibSize = 1000;
time_t igcLibMTime = 0;
auto hwInfo = this->context->getDevice(0)->getHardwareInfo();
auto input = ArrayRef<const char>(this->sourceCode.c_str(), this->sourceCode.size());
auto opts = ArrayRef<const char>(this->options.c_str(), this->options.size());
auto internalOptions = getInternalOptions();
auto internalOpts = ArrayRef<const char>(internalOptions.c_str(), internalOptions.size());
return cache.getCachedFileName(hwInfo, input, opts, internalOpts);
return cache.getCachedFileName(hwInfo, input, opts, internalOpts, igcRevision, igcLibSize, igcLibMTime);
}
} // namespace NEO