mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
performance: enable staging write for cl buffers
Related-To: NEO-13529 Also, add size threshold on iGPU on Linux, and disable staging if imported host ptr could be reused Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
35d8e82664
commit
b11322332c
@@ -94,4 +94,15 @@ TEST(OsInterfaceTest, whenOsInterfaceSetupGmmInputArgsThenArgsAreSet) {
|
||||
EXPECT_EQ(GMM_CLIENT::GMM_OCL_VISTA, passedInputArgs.ClientType);
|
||||
}
|
||||
|
||||
TEST(OsInterfaceTest, GivenLinuxOsInterfaceWhenGetThresholdForStagingCalledThenReturnThresholdForIntegratedDevices) {
|
||||
OSInterface osInterface;
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock *drm = new DrmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
osInterface.setDriverModel(std::unique_ptr<DriverModel>(drm));
|
||||
EXPECT_TRUE(osInterface.isSizeWithinThresholdForStaging(MemoryConstants::gigaByte, false));
|
||||
EXPECT_FALSE(osInterface.isSizeWithinThresholdForStaging(MemoryConstants::gigaByte, true));
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -153,3 +153,14 @@ TEST_F(OsInterfaceTest, givenEnableFtrTile64OptimizationDebugKeyWhenSetThenPrope
|
||||
EXPECT_EQ(1u, passedFtrTable.FtrTile64Optimization);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(OsInterfaceTest, whenGetThresholdForStagingCalledThenReturnNoThreshold) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
auto wddm = new WddmMock(rootDeviceEnvironment);
|
||||
EXPECT_EQ(nullptr, rootDeviceEnvironment.osInterface.get());
|
||||
wddm->init();
|
||||
EXPECT_NE(nullptr, rootDeviceEnvironment.osInterface.get());
|
||||
EXPECT_TRUE(rootDeviceEnvironment.osInterface->isSizeWithinThresholdForStaging(MemoryConstants::gigaByte, false));
|
||||
EXPECT_TRUE(rootDeviceEnvironment.osInterface->isSizeWithinThresholdForStaging(MemoryConstants::gigaByte, true));
|
||||
}
|
||||
Reference in New Issue
Block a user