P4 to Git Change 1593119 by skudchad@skudchad_test2_win_opencl on 2018/08/13 16:53:08

SWDEV-145570 - [HIP] Output Kernel name and mem arguments passed with LOG_LEVEL=3 for PAL and ROCm backends

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/15617/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#62 edit
This commit is contained in:
foreman
2018-08-13 17:07:02 -04:00
parent 8c7521debc
commit bc3e3217b6
2 changed files with 13 additions and 1 deletions
+8
View File
@@ -2167,6 +2167,9 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
}
}
size_t ldsSize;
LogPrintfInfo("!\tShaderName : %s\n", hsaKernel.name().c_str());
// Check memory dependency and SVM objects
if (!processMemObjectsHSA(kernel, parameters, nativeMem, ldsSize)) {
LogError("Wrong memory objects!");
@@ -3138,6 +3141,11 @@ bool VirtualGPU::processMemObjectsHSA(const amd::Kernel& kernel, const_address p
addVmMemory(gpuMem);
void* globalAddress = *(void**)(const_cast<address>(params) + desc.offset_);
LogPrintfInfo("!\targ%d: %s %s = ptr:%p obj:[%p-%p]\n", index, desc.typeName_, desc.name_,
globalAddress, (void*)gpuMem->vmAddress(),
(void*)((intptr_t)gpuMem->vmAddress() + gpuMem->size()));
//! Check if compiler expects read/write.
//! Note: SVM with subbuffers has an issue with tracking.
//! Conformance can send read only subbuffer, but update the region
+5 -1
View File
@@ -331,7 +331,9 @@ bool VirtualGPU::processMemObjects(const amd::Kernel& kernel, const_address para
// Synchronize data with other memory instances if necessary
gpuMem->syncCacheFromHost(*this);
}
void* globalAddress = *(void**)(const_cast<address>(params) + desc.offset_);
LogPrintfInfo("!\targ%d: %s %s = ptr:%p obj:[%p-%p]\n", index, desc.typeName_, desc.name_,
globalAddress, gpuMem->getDeviceMemory(), (void*)((intptr_t)gpuMem->getDeviceMemory() + mem->getSize()));
// Validate memory for a dependency in the queue
memoryDependency().validate(*this, gpuMem, (desc.info_.readOnly_ == 1));
@@ -2062,6 +2064,8 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
return false;
}
LogPrintfInfo("!\tShaderName : %s\n", gpuKernel.name().c_str());
// Check if runtime has to setup hidden arguments
for (uint32_t i = signature.numParameters(); i < signature.numParametersAll(); ++i) {
const auto it = signature.at(i);