Skip to content

Commit 0f78357

Browse files
Add option to pass bound BOs to exec
Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent cf7d02d commit 0f78357

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

opencl/test/unit_test/test_files/igdrcl.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ DirectSubmissionDisableCacheFlush = -1
9191
DirectSubmissionDisableMonitorFence = 0
9292
USMEvictAfterMigration = 1
9393
UseVmBind = 0
94+
PassBoundBOToExec = -1
9495
EnableNullHardware = 0
9596
ForceLinearImages = 0
9697
ForceSLML3Config = 0

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ DECLARE_DEBUG_VARIABLE(int64_t, ForceSystemMemoryPlacement, 0, "0: default, >0:
223223
DECLARE_DEBUG_VARIABLE(int64_t, ForceNonSystemMemoryPlacement, 0, "0: default, >0: (bitmask) for given Graphics Allocation Type, force non-system memory placement")
224224
DECLARE_DEBUG_VARIABLE(int64_t, DisableIndirectAccess, -1, "0: default, 0: Indirect access for L0 kernels is enabled, 1: Read IGC experimental properties to determine whether indirect access is required")
225225
DECLARE_DEBUG_VARIABLE(int32_t, UseVmBind, 0, "Use new residency model on Linux (requires kernel support), -1: default, 0: disabled, 1: enabled")
226+
DECLARE_DEBUG_VARIABLE(int32_t, PassBoundBOToExec, -1, "Pass bound BOs to exec call to keep dependencies")
226227
DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger")
227228
DECLARE_DEBUG_VARIABLE(bool, ReturnRawGpuTimestamps, false, "Driver returns raw GPU tiemstamps instead of calculated ones.")
228229
DECLARE_DEBUG_VARIABLE(bool, ForcePerDssBackedBufferProgramming, false, "Always program per-DSS memory backed buffer in preamble")

shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020 Intel Corporation
2+
* Copyright (C) 2020-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -93,7 +93,16 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::isResident(Device *device
9393

9494
void DrmMemoryOperationsHandlerBind::mergeWithResidencyContainer(OsContext *osContext, ResidencyContainer &residencyContainer) {
9595
this->makeResidentWithinOsContext(osContext, ArrayRef<GraphicsAllocation *>(residencyContainer), true);
96-
residencyContainer.clear();
96+
97+
auto clearContainer = true;
98+
99+
if (DebugManager.flags.PassBoundBOToExec.get() != -1) {
100+
clearContainer = !DebugManager.flags.PassBoundBOToExec.get();
101+
}
102+
103+
if (clearContainer) {
104+
residencyContainer.clear();
105+
}
97106
}
98107

99108
std::unique_lock<std::mutex> DrmMemoryOperationsHandlerBind::lockHandlerIfUsed() {

0 commit comments

Comments
 (0)