mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:

committed by
Jaroslaw Chodor

parent
d015d3633f
commit
e8852a68c4
41
opencl/test/unit_test/fixtures/built_in_fixture.cpp
Normal file
41
opencl/test/unit_test/fixtures/built_in_fixture.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fixtures/built_in_fixture.h"
|
||||
|
||||
#include "core/device/device.h"
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
|
||||
#include "global_environment.h"
|
||||
#include "helpers/kernel_binary_helper.h"
|
||||
#include "helpers/test_files.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
BuiltInFixture::BuiltInFixture() : pBuiltIns(nullptr) {
|
||||
}
|
||||
|
||||
void BuiltInFixture::SetUp(Device *pDevice) {
|
||||
// create an instance of the builtins
|
||||
pBuiltIns = pDevice->getExecutionEnvironment()->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();
|
||||
}
|
Reference in New Issue
Block a user