mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add ClDeviceInfo
DeviceInfo contains a subset of ClDeviceInfo values. Related-To: NEO-3938 Change-Id: Idae4fae4d25e1fb3106d8b95294fa70ebc6281df Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
c5454d6cce
commit
5ac8d8e667
@ -41,11 +41,9 @@ TEST(DeviceWithSourceLevelDebugger, givenDeviceWithSourceLevelDebuggerActiveWhen
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
auto gmock = new ::testing::NiceMock<GMockSourceLevelDebugger>(new MockOsLibrary);
|
||||
executionEnvironment->debugger.reset(gmock);
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::create<MockDeviceWithDebuggerActive>(executionEnvironment, 0u));
|
||||
std::unique_ptr<MockClDevice> pClDevice(new MockClDevice{device.get()});
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::create<MockDeviceWithDebuggerActive>(executionEnvironment, 0u));
|
||||
|
||||
EXPECT_CALL(*gmock, notifyDeviceDestruction()).Times(1);
|
||||
device.release();
|
||||
}
|
||||
|
||||
TEST(DeviceWithSourceLevelDebugger, givenDeviceWithSourceLevelDebuggerActiveWhenDeviceIsCreatedThenPreemptionIsDisabled) {
|
||||
|
@ -460,7 +460,7 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceIsConstructe
|
||||
DebuggerLibrary::setDebuggerActive(true);
|
||||
DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor);
|
||||
|
||||
unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
EXPECT_TRUE(interceptor.initCalled);
|
||||
}
|
||||
}
|
||||
@ -520,7 +520,7 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenDeviceIsCreated
|
||||
DebuggerLibrary::setDebuggerActive(false);
|
||||
DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor);
|
||||
|
||||
unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
|
||||
EXPECT_EQ(nullptr, device->getDebugger());
|
||||
EXPECT_FALSE(interceptor.initCalled);
|
||||
@ -541,12 +541,12 @@ TEST(SourceLevelDebugger, givenTwoRootDevicesWhenSecondIsCreatedThenNotCreatingN
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
|
||||
}
|
||||
std::unique_ptr<Device> device1(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device1 = std::make_unique<MockClDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
EXPECT_NE(nullptr, executionEnvironment->memoryManager);
|
||||
EXPECT_TRUE(interceptor.initCalled);
|
||||
|
||||
interceptor.initCalled = false;
|
||||
std::unique_ptr<Device> device2(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
auto device2 = std::make_unique<MockClDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
EXPECT_NE(nullptr, executionEnvironment->memoryManager);
|
||||
EXPECT_FALSE(interceptor.initCalled);
|
||||
}
|
||||
@ -564,9 +564,9 @@ TEST(SourceLevelDebugger, givenMultipleRootDevicesWhenTheyAreCreatedTheyAllReuse
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
|
||||
}
|
||||
std::unique_ptr<Device> device1(Device::create<NEO::MockDevice>(executionEnvironment, 0u));
|
||||
auto device1 = std::make_unique<MockClDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto sourceLevelDebugger = device1->getDebugger();
|
||||
std::unique_ptr<Device> device2(Device::create<NEO::MockDevice>(executionEnvironment, 1u));
|
||||
auto device2 = std::make_unique<MockClDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
EXPECT_EQ(sourceLevelDebugger, device2->getDebugger());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user