create trace files about cl_cache usage

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2021-10-28 13:06:49 +00:00
committed by Compute-Runtime-Automation
parent ad8e640545
commit 53223dc2b5
7 changed files with 108 additions and 14 deletions

View File

@@ -26,9 +26,6 @@ struct CompilerCacheConfig {
class CompilerCache {
public:
static const std::string getCachedFileName(const HardwareInfo &hwInfo, ArrayRef<const char> input,
ArrayRef<const char> options, ArrayRef<const char> internalOptions);
CompilerCache(const CompilerCacheConfig &config);
virtual ~CompilerCache() = default;
@@ -37,6 +34,9 @@ class CompilerCache {
CompilerCache &operator=(const CompilerCache &) = delete;
CompilerCache &operator=(CompilerCache &&) = delete;
const std::string getCachedFileName(const HardwareInfo &hwInfo, ArrayRef<const char> input,
ArrayRef<const char> options, ArrayRef<const char> internalOptions);
MOCKABLE_VIRTUAL bool cacheBinary(const std::string kernelFileHash, const char *pBinary, uint32_t binarySize);
MOCKABLE_VIRTUAL std::unique_ptr<char[]> loadCachedBinary(const std::string kernelFileHash, size_t &cachedBinarySize);