mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Cleaned up files: shared/source/command_stream/command_stream_receiver_hw.h shared/source/compiler_interface/compiler_interface.h shared/source/direct_submission/direct_submission_hw.h shared/source/helpers/dirty_state_helpers.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/test/common/helpers/kernel_binary_helper.h"
|
|
|
|
#include "shared/source/compiler_interface/compiler_cache.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();
|
|
}
|