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:
Szymon Morek
2025-02-04 10:24:31 +00:00
committed by Compute-Runtime-Automation
parent 35d8e82664
commit b11322332c
14 changed files with 174 additions and 22 deletions

View File

@@ -58,6 +58,13 @@ bool initDrmOsInterface(std::unique_ptr<HwDeviceId> &&hwDeviceId, uint32_t rootD
return true;
}
bool OSInterface::isSizeWithinThresholdForStaging(size_t size, bool isIGPU) const {
if (isIGPU) {
return size < 512 * MemoryConstants::megaByte;
}
return true;
}
uint32_t OSInterface::getAggregatedProcessCount() const {
if (driverModel && driverModel->getDriverModelType() == DriverModelType::drm) {
return driverModel->as<Drm>()->getAggregatedProcessCount();