Files
compute-runtime/opencl/test/unit_test/fixtures/built_in_fixture.cpp
Mateusz Hoppe bd247d725b AppendLaunchKernel tests
RelatedTo: NEO-4515

Change-Id: I1f719ea1f60f313fba44d49f84fe2caf6ea4e5c4
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-04-06 15:46:04 +02:00

39 lines
1.1 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/fixtures/built_in_fixture.h"
#include "shared/source/built_ins/built_ins.h"
#include "shared/source/device/device.h"
#include "shared/test/unit_test/helpers/test_files.h"
#include "opencl/test/unit_test/global_environment.h"
#include "opencl/test/unit_test/helpers/kernel_binary_helper.h"
using namespace NEO;
void BuiltInFixture::SetUp(Device *pDevice) {
// create an instance of the builtins
pBuiltIns = pDevice->getBuiltIns();
pBuiltIns->setCacheingEnableState(false);
// set mock compiler to return expected kernel...
MockCompilerDebugVars fclDebugVars;
MockCompilerDebugVars igcDebugVars;
retrieveBinaryKernelFilename(fclDebugVars.fileName, KernelBinaryHelper::BUILT_INS + "_", ".bc");
retrieveBinaryKernelFilename(igcDebugVars.fileName, KernelBinaryHelper::BUILT_INS + "_", ".gen");
gEnvironment->fclPushDebugVars(fclDebugVars);
gEnvironment->igcPushDebugVars(igcDebugVars);
}
void BuiltInFixture::TearDown() {
gEnvironment->igcPopDebugVars();
gEnvironment->fclPopDebugVars();
}