2018-09-17 15:42:15 +02:00
|
|
|
/*
|
2021-01-21 13:10:13 +01:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2018-09-17 15:42:15 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-23 15:20:22 +01:00
|
|
|
#include "opencl/test/unit_test/fixtures/device_instrumentation_fixture.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2021-12-23 13:48:36 +00:00
|
|
|
#include "shared/test/common/helpers/execution_environment_helper.h"
|
2021-01-21 13:10:13 +01:00
|
|
|
#include "shared/test/common/mocks/mock_device.h"
|
2020-04-02 09:35:50 +02:00
|
|
|
|
2020-03-20 11:15:25 +01:00
|
|
|
#include "opencl/source/cl_device/cl_device.h"
|
2020-03-17 14:25:44 +01:00
|
|
|
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
2018-09-17 15:42:15 +02:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-09-17 15:42:15 +02:00
|
|
|
void DeviceInstrumentationFixture::SetUp(bool instrumentation) {
|
2019-11-06 18:14:30 +01:00
|
|
|
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
2019-08-07 09:19:51 +02:00
|
|
|
hwInfo->capabilityTable.instrumentationEnabled = instrumentation;
|
2020-01-27 10:36:39 +01:00
|
|
|
device = std::make_unique<ClDevice>(*Device::create<RootDevice>(executionEnvironment, 0), platform());
|
2018-09-17 15:42:15 +02:00
|
|
|
}
|
2020-01-14 14:32:11 +01:00
|
|
|
|
2019-05-06 12:33:44 +02:00
|
|
|
} // namespace NEO
|