Files
compute-runtime/unit_tests/helpers/kernel_binary_helper.cpp
Pawel Wilma 315df91d9d Builtin kernels refactoring
Related-To: NEO-3220
Change-Id: Ib85a1f4fd69b47bc8e819a29cc4adec73bda72e0
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2020-01-24 11:56:02 +01:00

36 lines
1.0 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/kernel_binary_helper.h"
#include "unit_tests/global_environment.h"
#include "unit_tests/helpers/test_files.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 + "_", ".gen");
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
igcDebugVars.appendOptionsToFileName = appendOptionsToFileName;
gEnvironment->fclPushDebugVars(fclDebugVars);
gEnvironment->igcPushDebugVars(igcDebugVars);
}
KernelBinaryHelper::~KernelBinaryHelper() {
gEnvironment->igcPopDebugVars();
gEnvironment->fclPopDebugVars();
}