mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add debug key to print UMD shared migrations
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
890eec6105
commit
803d7cdd8a
@@ -188,6 +188,7 @@ DECLARE_DEBUG_VARIABLE(bool, ProvideVerboseImplicitFlush, false, "provides verbo
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintBlitDispatchDetails, false, "Print blit dispatch details")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintIoctlTimes, false, "Print ioctl times")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintIoctlEntries, false, "Print ioctl being called")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintUmdSharedMigration, false, "Print log message when shared allocation is being migrated by UMD")
|
||||
|
||||
/*PERFORMANCE FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForBuffers, false, "When active all buffer allocations will not share memory with CPU.")
|
||||
|
||||
@@ -57,6 +57,9 @@ void PageFaultManager::moveAllocationToGpuDomain(void *ptr) {
|
||||
if (pageFaultData.domain != AllocationDomain::Gpu) {
|
||||
this->setAubWritable(false, ptr, pageFaultData.unifiedMemoryManager);
|
||||
if (pageFaultData.domain == AllocationDomain::Cpu) {
|
||||
if (DebugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferring shared allocation %llx from CPU to GPU\n", reinterpret_cast<unsigned long long int>(ptr));
|
||||
}
|
||||
this->transferToGpu(ptr, pageFaultData.cmdQ);
|
||||
this->protectCPUMemoryAccess(ptr, pageFaultData.size);
|
||||
}
|
||||
@@ -73,6 +76,9 @@ void PageFaultManager::moveAllocationsWithinUMAllocsManagerToGpuDomain(SVMAllocs
|
||||
if (pageFaultData.unifiedMemoryManager == unifiedMemoryManager && pageFaultData.domain != AllocationDomain::Gpu) {
|
||||
this->setAubWritable(false, allocPtr, pageFaultData.unifiedMemoryManager);
|
||||
if (pageFaultData.domain == AllocationDomain::Cpu) {
|
||||
if (DebugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferring shared allocation %llx from CPU to GPU\n", reinterpret_cast<unsigned long long int>(allocPtr));
|
||||
}
|
||||
this->transferToGpu(allocPtr, pageFaultData.cmdQ);
|
||||
this->protectCPUMemoryAccess(allocPtr, pageFaultData.size);
|
||||
}
|
||||
@@ -101,6 +107,9 @@ void PageFaultManager::setGpuDomainHandler(gpuDomainHandlerFunc gpuHandlerFuncPt
|
||||
|
||||
void PageFaultManager::handleGpuDomainTransferForHw(PageFaultManager *pageFaultHandler, void *allocPtr, PageFaultData &pageFaultData) {
|
||||
if (pageFaultData.domain == AllocationDomain::Gpu) {
|
||||
if (DebugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferring shared allocation %llx from GPU to CPU\n", reinterpret_cast<unsigned long long int>(allocPtr));
|
||||
}
|
||||
pageFaultHandler->transferToCpu(allocPtr, pageFaultData.size, pageFaultData.cmdQ);
|
||||
}
|
||||
pageFaultData.domain = AllocationDomain::Cpu;
|
||||
@@ -111,6 +120,9 @@ void PageFaultManager::handleGpuDomainTransferForAubAndTbx(PageFaultManager *pag
|
||||
pageFaultHandler->allowCPUMemoryAccess(allocPtr, pageFaultData.size);
|
||||
|
||||
if (pageFaultData.domain == AllocationDomain::Gpu) {
|
||||
if (DebugManager.flags.PrintUmdSharedMigration.get()) {
|
||||
printf("UMD transferring shared allocation %llx from GPU to CPU\n", reinterpret_cast<unsigned long long int>(allocPtr));
|
||||
}
|
||||
pageFaultHandler->transferToCpu(allocPtr, pageFaultData.size, pageFaultData.cmdQ);
|
||||
}
|
||||
pageFaultData.domain = AllocationDomain::Cpu;
|
||||
|
||||
Reference in New Issue
Block a user