Files
compute-runtime/opencl/test/unit_test/fixtures/run_kernel_fixture.h
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

46 lines
1.3 KiB
C++

/*
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/helpers/test_files.h"
#include "shared/test/common/libult/global_environment.h"
namespace NEO {
struct CommandQueueHwFixture;
struct CommandStreamFixture;
// helper functions to enforce MockCompiler input files
inline void overwriteBuiltInBinaryName(
const std::string &filename,
bool appendOptionsToFileName = false) {
// set mock compiler to return expected kernel...
MockCompilerDebugVars fclDebugVars;
MockCompilerDebugVars igcDebugVars;
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".bc");
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
igcDebugVars.appendOptionsToFileName = appendOptionsToFileName;
gEnvironment->fclPushDebugVars(fclDebugVars);
gEnvironment->igcPushDebugVars(igcDebugVars);
}
inline void restoreBuiltInBinaryName() {
gEnvironment->igcPopDebugVars();
gEnvironment->fclPopDebugVars();
}
struct RunKernelFixtureFactory {
typedef NEO::CommandStreamFixture CommandStreamFixture;
typedef NEO::CommandQueueHwFixture CommandQueueFixture;
};
} // namespace NEO