P4 to Git Change 1598045 by skudchad@skudchad_test2_win_opencl on 2018/08/24 14:07:44

SWDEV-145570 - [HIP] Output threadID along with kernel info with LOG_LEVEL=3

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#121 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#65 edit
This commit is contained in:
foreman
2018-08-24 14:21:35 -04:00
bovenliggende 7384db1dd2
commit cf0504da19
2 gewijzigde bestanden met toevoegingen van 8 en 5 verwijderingen
@@ -21,6 +21,7 @@
#include <fstream>
#include <sstream>
#include <algorithm>
#include <thread>
#include "palQueue.h"
#include "palFence.h"
@@ -3140,11 +3141,10 @@ bool VirtualGPU::processMemObjectsHSA(const amd::Kernel& kernel, const_address p
gpuMem->wait(*this, WaitOnBusyEngine);
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_,
LogPrintfInfo("!\targ%d: %s %s = ptr:%p obj:[%p-%p] threadId : %zx\n", index, desc.typeName_, desc.name_,
globalAddress, (void*)gpuMem->vmAddress(),
(void*)((intptr_t)gpuMem->vmAddress() + gpuMem->size()));
(void*)((intptr_t)gpuMem->vmAddress() + gpuMem->size()), std::this_thread::get_id());
//! Check if compiler expects read/write.
//! Note: SVM with subbuffers has an issue with tracking.
@@ -21,6 +21,7 @@
#include <vector>
#include <string>
#include <limits>
#include <thread>
/**
* HSA image object size in bytes (see HSAIL spec)
@@ -332,8 +333,10 @@ bool VirtualGPU::processMemObjects(const amd::Kernel& kernel, const_address para
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()));
LogPrintfInfo("!\targ%d: %s %s = ptr:%p obj:[%p-%p] threadId : %zx\n", index, desc.typeName_,
desc.name_, globalAddress, gpuMem->getDeviceMemory(),
(void*)((intptr_t)gpuMem->getDeviceMemory() + mem->getSize()),
std::this_thread::get_id());
// Validate memory for a dependency in the queue
memoryDependency().validate(*this, gpuMem, (desc.info_.readOnly_ == 1));