mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Dates corrected in copyright headers to reflect original publication date (2018 for OpenCL, 2020 for Level Zero). Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
/*
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "opencl/test/unit_test/helpers/kernel_binary_helper.h"
|
|
|
|
#include "shared/test/common/helpers/test_files.h"
|
|
|
|
#include "opencl/test/unit_test/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 + "_", ".gen");
|
|
|
|
fclDebugVars.appendOptionsToFileName = appendOptionsToFileName;
|
|
igcDebugVars.appendOptionsToFileName = appendOptionsToFileName;
|
|
|
|
gEnvironment->fclPushDebugVars(fclDebugVars);
|
|
gEnvironment->igcPushDebugVars(igcDebugVars);
|
|
}
|
|
|
|
KernelBinaryHelper::~KernelBinaryHelper() {
|
|
gEnvironment->igcPopDebugVars();
|
|
gEnvironment->fclPopDebugVars();
|
|
}
|