mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f2ede40d2e
commit
c9664e6bad
@@ -125,7 +125,7 @@ cl_mem Buffer::validateInputAndCreateBuffer(cl_context context,
|
||||
auto pDevice = pContext->getDevice(0);
|
||||
bool allowCreateBuffersWithUnrestrictedSize = isValueSet(flags, CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL) ||
|
||||
isValueSet(flagsIntel, CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL) ||
|
||||
DebugManager.flags.AllowUnrestrictedSize.get();
|
||||
debugManager.flags.AllowUnrestrictedSize.get();
|
||||
|
||||
if (size == 0 || (size > pDevice->getDevice().getDeviceInfo().maxMemAllocSize && !allowCreateBuffersWithUnrestrictedSize)) {
|
||||
retVal = CL_INVALID_BUFFER_SIZE;
|
||||
@@ -210,8 +210,8 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||
isCompressionEnabled == false &&
|
||||
productHelper.getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed &&
|
||||
isLockable;
|
||||
if (DebugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
||||
copyOnCpuAllowed = DebugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
||||
if (debugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
||||
copyOnCpuAllowed = debugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
||||
}
|
||||
if (auto lockedPointer = copyOnCpuAllowed ? device.getMemoryManager()->lockResource(memory) : nullptr) {
|
||||
memcpy_s(ptrOffset(lockedPointer, buffer->getOffset()), size, hostPtr, size);
|
||||
@@ -371,7 +371,7 @@ Buffer *Buffer::create(Context *context,
|
||||
}
|
||||
}
|
||||
|
||||
if (DebugManager.flags.DisableZeroCopyForUseHostPtr.get()) {
|
||||
if (debugManager.flags.DisableZeroCopyForUseHostPtr.get()) {
|
||||
allocationInfo.zeroCopyAllowed = false;
|
||||
allocationInfo.allocateMemory = true;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ Buffer *Buffer::create(Context *context,
|
||||
}
|
||||
}
|
||||
|
||||
if (DebugManager.flags.DisableZeroCopyForBuffers.get()) {
|
||||
if (debugManager.flags.DisableZeroCopyForBuffers.get()) {
|
||||
allocationInfo.zeroCopyAllowed = false;
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ Buffer *Buffer::create(Context *context,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (DebugManager.flags.MakeAllBuffersResident.get()) {
|
||||
if (debugManager.flags.MakeAllBuffersResident.get()) {
|
||||
for (size_t deviceNum = 0u; deviceNum < context->getNumDevices(); deviceNum++) {
|
||||
auto device = context->getDevice(deviceNum);
|
||||
auto graphicsAllocation = pBuffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
|
||||
@@ -82,7 +82,7 @@ MemObj::~MemObj() {
|
||||
needWait |= multiGraphicsAllocation.getGraphicsAllocations().size() > 1u;
|
||||
for (auto graphicsAllocation : multiGraphicsAllocation.getGraphicsAllocations()) {
|
||||
auto rootDeviceIndex = graphicsAllocation ? graphicsAllocation->getRootDeviceIndex() : 0;
|
||||
bool doAsyncDestructions = DebugManager.flags.EnableAsyncDestroyAllocations.get();
|
||||
bool doAsyncDestructions = debugManager.flags.EnableAsyncDestroyAllocations.get();
|
||||
if (graphicsAllocation && !associatedMemObject && !isHostPtrSVM && graphicsAllocation->peekReuseCount() == 0) {
|
||||
memoryManager->removeAllocationFromHostPtrManager(graphicsAllocation);
|
||||
if (!doAsyncDestructions) {
|
||||
@@ -434,7 +434,7 @@ bool MemObj::isTiledAllocation() const {
|
||||
|
||||
bool MemObj::mappingOnCpuAllowed() const {
|
||||
auto graphicsAllocation = multiGraphicsAllocation.getDefaultGraphicsAllocation();
|
||||
return !isTiledAllocation() && !peekSharingHandler() && !isMipMapped(this) && !DebugManager.flags.DisableZeroCopyForBuffers.get() &&
|
||||
return !isTiledAllocation() && !peekSharingHandler() && !isMipMapped(this) && !debugManager.flags.DisableZeroCopyForBuffers.get() &&
|
||||
!graphicsAllocation->isCompressionEnabled() && MemoryPoolHelper::isSystemMemoryPool(graphicsAllocation->getMemoryPool()) &&
|
||||
allowCpuAccess();
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ bool MemObjHelper::isSuitableForCompression(bool compressionSupported, const Mem
|
||||
for (auto &pClDevice : context.getDevices()) {
|
||||
auto rootDeviceIndex = pClDevice->getRootDeviceIndex();
|
||||
if (context.containsMultipleSubDevices(rootDeviceIndex)) {
|
||||
if (DebugManager.flags.EnableMultiTileCompression.get() <= 0) {
|
||||
if (debugManager.flags.EnableMultiTileCompression.get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ bool MemObjHelper::isSuitableForCompression(bool compressionSupported, const Mem
|
||||
if (properties.flags.compressedHint) {
|
||||
return true;
|
||||
}
|
||||
int32_t disableCompression = DebugManager.flags.ToggleHintKernelDisableCompression.get();
|
||||
int32_t disableCompression = debugManager.flags.ToggleHintKernelDisableCompression.get();
|
||||
if (disableCompression != -1) {
|
||||
return !!disableCompression;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user