performance: Limit tlb flush WA scope on DG2 Linux

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-12-21 09:58:49 +00:00
committed by Compute-Runtime-Automation
parent f7eb961435
commit fa181937a4
16 changed files with 81 additions and 15 deletions

View File

@@ -140,6 +140,15 @@ TEST_F(DrmBufferObjectTest, whenExecFailsThenValidateHostPtrFails) {
EXPECT_EQ(EINVAL, ret);
}
TEST_F(DrmBufferObjectTest, whenSetImageAllocTypeForBOThenReturnProperValue) {
TestedBufferObject bo(0u, this->mock.get());
EXPECT_FALSE(bo.isImage());
bo.setIsImage(AllocationType::kernelIsa);
EXPECT_FALSE(bo.isImage());
bo.setIsImage(AllocationType::image);
EXPECT_TRUE(bo.isImage());
}
TEST_F(DrmBufferObjectTest, givenResidentBOWhenPrintExecutionBufferIsSetToTrueThenDebugInformationAboutBOIsPrinted) {
mock->ioctlExpected.total = 1;
DebugManagerStateRestore restore;

View File

@@ -131,7 +131,7 @@ TEST_F(DrmMemoryOperationsHandlerBindMultiRootDeviceTest, whenSetNewResourceBoun
for (const auto &engine : device->getAllEngines()) {
auto osContexLinux = static_cast<MockOsContextLinux *>(engine.osContext);
if (osContexLinux->getDeviceBitfield().test(1u) && executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()]->getProductHelper().isTlbFlushRequired()) {
if (osContexLinux->getDeviceBitfield().test(1u) && executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()]->getProductHelper().isTlbFlushRequired(*executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()]->getHardwareInfo(), true, false)) {
EXPECT_TRUE(osContexLinux->isTlbFlushRequired());
} else {
EXPECT_FALSE(osContexLinux->isTlbFlushRequired());
@@ -150,7 +150,7 @@ TEST_F(DrmMemoryOperationsHandlerBindMultiRootDeviceTest, whenSetNewResourceBoun
for (const auto &engine : devices[1]->getAllEngines()) {
auto osContexLinux = static_cast<MockOsContextLinux *>(engine.osContext);
if (osContexLinux->getDeviceBitfield().test(0u) && executionEnvironment->rootDeviceEnvironments[1]->getProductHelper().isTlbFlushRequired()) {
if (osContexLinux->getDeviceBitfield().test(0u) && executionEnvironment->rootDeviceEnvironments[1]->getProductHelper().isTlbFlushRequired(*executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()]->getHardwareInfo(), true, false)) {
EXPECT_TRUE(osContexLinux->isTlbFlushRequired());
} else {
EXPECT_FALSE(osContexLinux->isTlbFlushRequired());
@@ -168,7 +168,7 @@ TEST_F(DrmMemoryOperationsHandlerBindMultiRootDeviceTest, whenSetNewResourceBoun
for (const auto &engine : device->getAllEngines()) {
auto osContexLinux = static_cast<MockOsContextLinux *>(engine.osContext);
if (osContexLinux->getDeviceBitfield().test(1u) && executionEnvironment->rootDeviceEnvironments[1]->getProductHelper().isTlbFlushRequired()) {
if (osContexLinux->getDeviceBitfield().test(1u) && executionEnvironment->rootDeviceEnvironments[1]->getProductHelper().isTlbFlushRequired(*executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()]->getHardwareInfo(), true, false)) {
EXPECT_TRUE(osContexLinux->isTlbFlushRequired());
} else {
EXPECT_FALSE(osContexLinux->isTlbFlushRequired());