Set isLockable if size small enough for cpu memcpy

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2022-12-06 10:19:05 +00:00
committed by Compute-Runtime-Automation
parent 336c8c10d5
commit 41a80072b9
9 changed files with 124 additions and 17 deletions

View File

@@ -8,6 +8,7 @@
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/hw_info.h"
#include <algorithm>
@@ -80,4 +81,16 @@ uint32_t GfxCoreHelper::getHighestEnabledSlice(const HardwareInfo &hwInfo) {
return highestEnabledSlice;
}
void HwHelper::getCpuCopyThresholds(size_t &h2DThreshold, size_t &d2HThreshold) {
h2DThreshold = NonUsmCpuCopyConstants::h2DThreshold;
d2HThreshold = NonUsmCpuCopyConstants::d2HThreshold;
if (NEO::DebugManager.flags.ExperimentalH2DCpuCopyThreshold.get() != -1) {
h2DThreshold = NEO::DebugManager.flags.ExperimentalH2DCpuCopyThreshold.get();
}
if (NEO::DebugManager.flags.ExperimentalD2HCpuCopyThreshold.get() != -1) {
d2HThreshold = NEO::DebugManager.flags.ExperimentalD2HCpuCopyThreshold.get();
}
}
} // namespace NEO