Files
compute-runtime/shared/test/common/helpers/kernel_binary_helper.cpp
Compute-Runtime-Validation f4106ca44c Revert "fix: use .spv for intermediate representation"
This reverts commit 6c9bca8cdc.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-11 05:57:05 +02:00

39 lines
1.1 KiB
C++

/*
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/helpers/kernel_binary_helper.h"
#include "shared/test/common/helpers/test_files.h"
#include "shared/test/common/libult/global_environment.h"
#include <string>
extern PRODUCT_FAMILY productFamily;
KernelBinaryHelper::KernelBinaryHelper(const std::string &name, bool appendOptionsToFileName) {
// set mock compiler to return expected kernel
MockCompilerDebugVars fclDebugVars;
MockCompilerDebugVars igcDebugVars;
retrieveBinaryKernelFilename(fclDebugVars.fileName, name + "_", ".bc");
retrieveBinaryKernelFilename(igcDebugVars.fileName, name + "_", ".bin");
appendBinaryNameSuffix(fclDebugVars.fileNameSuffix);
appendBinaryNameSuffix(igcDebugVars.fileNameSuffix);
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
igcDebugVars.appendOptionsToFileName = appendOptionsToFileName;
gEnvironment->fclPushDebugVars(fclDebugVars);
gEnvironment->igcPushDebugVars(igcDebugVars);
}
KernelBinaryHelper::~KernelBinaryHelper() {
gEnvironment->igcPopDebugVars();
gEnvironment->fclPopDebugVars();
}