SWDEV-257787 - Add log for tracking copy signals
Change-Id: I713e8463916a85a634a1ec2309bbd46a11c461a8
[ROCm/clr commit: 629a2d8ef3]
This commit is contained in:
@@ -456,6 +456,10 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp());
|
||||
|
||||
// Copy memory line by line
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY,
|
||||
"[%zx]!\t HSA Asycn Copy Rect wait_event=0x%zx, completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), (wait_event != nullptr) ? wait_event->handle : 0,
|
||||
active.handle);
|
||||
hsa_status_t status = hsa_amd_memory_async_copy_rect(&dstMem, &offset,
|
||||
&srcMem, &offset, &dim, agent, direction, num_wait_events, wait_event, active);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
@@ -474,6 +478,10 @@ bool DmaBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory& d
|
||||
size_t dstOffset = dstRect.offset(0, y, z);
|
||||
|
||||
// Copy memory line by line
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY,
|
||||
"[%zx]!\t HSA Asycn Copy wait_event=0x%zx, completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), (wait_event != nullptr) ? wait_event->handle : 0,
|
||||
active.handle);
|
||||
hsa_status_t status = hsa_amd_memory_async_copy(
|
||||
(reinterpret_cast<address>(dst) + dstOffset), dstAgent,
|
||||
(reinterpret_cast<const_address>(src) + srcOffset), srcAgent,
|
||||
@@ -664,6 +672,11 @@ bool DmaBlitManager::hsaCopy(const Memory& srcMemory, const Memory& dstMemory,
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp());
|
||||
|
||||
// Use SDMA to transfer the data
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY,
|
||||
"[%zx]!\t HSA Asycn Copy wait_event=0x%zx, completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), (wait_event != nullptr) ? wait_event->handle : 0,
|
||||
active.handle);
|
||||
|
||||
status = hsa_amd_memory_async_copy(dst, dstAgent, src, srcAgent,
|
||||
size[0], num_wait_events, wait_event, active);
|
||||
if (status == HSA_STATUS_SUCCESS) {
|
||||
@@ -719,6 +732,9 @@ bool DmaBlitManager::hsaCopyStaged(const_address hostSrc, address hostDst, size_
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp());
|
||||
|
||||
memcpy(hsaBuffer, hostSrc + offset, size);
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY,
|
||||
"[%zx]!\t HSA Async Copy completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), active.handle);
|
||||
status = hsa_amd_memory_async_copy(hostDst + offset, dev().getBackendDevice(), hsaBuffer,
|
||||
srcAgent, size, 0, nullptr, active);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
@@ -748,6 +764,9 @@ bool DmaBlitManager::hsaCopyStaged(const_address hostSrc, address hostDst, size_
|
||||
hsa_signal_t active = gpu().Barriers().ActiveSignal(kInitSignalValueOne, gpu().timestamp());
|
||||
|
||||
// Copy data from Device to Host
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY,
|
||||
"[%zx]!\t HSA Async Copy completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), active.handle);
|
||||
status = hsa_amd_memory_async_copy(hsaBuffer, dstAgent, hostSrc + offset,
|
||||
dev().getBackendDevice(), size, 0, nullptr, active);
|
||||
if (status == HSA_STATUS_SUCCESS) {
|
||||
|
||||
@@ -367,6 +367,8 @@ bool VirtualGPU::HwQueueTracker::CpuWaitForSignal(ProfilingSignal* signal) {
|
||||
if (signal->ts_ != nullptr) {
|
||||
signal->ts_->checkGpuTime();
|
||||
} else {
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY, "[%zx]!\t Host wait on completion_signal=0x%zx\n",
|
||||
std::this_thread::get_id(), signal->signal_.handle);
|
||||
if (!WaitForSignal(signal->signal_)) {
|
||||
LogPrintfError("Failed signal [0x%lx] wait", signal->signal_);
|
||||
return false;
|
||||
@@ -518,8 +520,9 @@ bool VirtualGPU::processMemObjects(const amd::Kernel& kernel, const_address para
|
||||
gpuMem = static_cast<Memory*>(mem->getDeviceMemory(dev()));
|
||||
|
||||
const void* globalAddress = *reinterpret_cast<const void* const*>(params + desc.offset_);
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN, "!\targ%d: %s %s = ptr:%p obj:[%p-%p] threadId : %zx\n", index,
|
||||
desc.typeName_.c_str(), desc.name_.c_str(),
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN,
|
||||
"!\targ%d: %s %s = ptr:%p obj:[%p-%p] threadId : %zx\n",
|
||||
index, desc.typeName_.c_str(), desc.name_.c_str(),
|
||||
globalAddress, gpuMem->getDeviceMemory(),
|
||||
reinterpret_cast<address>(gpuMem->getDeviceMemory()) + mem->getSize(),
|
||||
std::this_thread::get_id());
|
||||
@@ -668,7 +671,8 @@ bool VirtualGPU::dispatchGenericAqlPacket(
|
||||
packet_store_release(reinterpret_cast<uint32_t*>(aql_loc), header, rest);
|
||||
}
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_AQL,
|
||||
"[%zx] HWq=0x%zx, Dispatch Header = 0x%x (type=%d, barrier=%d, acquire=%d, release=%d), "
|
||||
"[%zx] HWq=0x%zx, Dispatch Header = "
|
||||
"0x%x (type=%d, barrier=%d, acquire=%d, release=%d), "
|
||||
"setup=%d, grid=[%zu, %zu, %zu], workgroup=[%zu, %zu, %zu], private_seg_size=%zu, "
|
||||
"group_seg_size=%zu, kernel_obj=0x%zx, kernarg_address=0x%zx, completion_signal=0x%zx",
|
||||
std::this_thread::get_id(), gpu_queue_,
|
||||
@@ -2361,7 +2365,8 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
|
||||
return false;
|
||||
}
|
||||
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN, "[%zx]!\tShaderName : %s\n", std::this_thread::get_id(), gpuKernel.name().c_str());
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN, "[%zx]!\tShaderName : %s\n",
|
||||
std::this_thread::get_id(), gpuKernel.name().c_str());
|
||||
|
||||
// Check if runtime has to setup hidden arguments
|
||||
for (uint32_t i = signature.numParameters(); i < signature.numParametersAll(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user