P4 to Git Change 1123622 by wchau@wchau_WINDOWS7_OCL on 2015/02/19 17:52:17
ECR #399840 - OpenCL Runtime HW Debug support development - use device to control debugger registration and exception notification so that debug event will not be tied to any particular queue. - use aqlCodeInfo parameter for clHwDbgMapKernelCodeAMD() to be consistent with clHwDbgGetAqlPacketInfoAMD() Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.h#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudebugmanager.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudebugmanager.hpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#352 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#127 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#70 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.h#43 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hwdebug.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hwdebug.hpp#6 edit
This commit is contained in:
@@ -403,7 +403,6 @@ VirtualGPU::VirtualGPU(
|
||||
, schedParamIdx_(0)
|
||||
, deviceQueueSize_(0)
|
||||
, hsaQueueMem_(NULL)
|
||||
, useHwDebug_(false)
|
||||
{
|
||||
memset(&cal_, 0, sizeof(CalVirtualDesc));
|
||||
for (uint i = 0; i < AllEngines; ++i) {
|
||||
@@ -587,15 +586,6 @@ VirtualGPU::create(
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if HW Debug is used and register the debugger if not done yet
|
||||
amd::HwDebugManager * dbgManager = dev().hwDebugMgr();
|
||||
|
||||
if ( dbgManager && dbgManager->isMsgBufferReady() ) {
|
||||
if ( dbgManager->registerDebuggerOnQueue(this) == CL_SUCCESS ) {
|
||||
useHwDebug_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1648,6 +1638,7 @@ VirtualGPU::submitKernelInternalHSA(
|
||||
uint64_t vmDefQueue = 0;
|
||||
amd::DeviceQueue* defQueue = kernel.program().context().defDeviceQueue(dev());
|
||||
VirtualGPU* gpuDefQueue = NULL;
|
||||
amd::HwDebugManager * dbgManager = dev().hwDebugMgr();
|
||||
|
||||
// Get the HSA kernel object
|
||||
const HSAILKernel& hsaKernel =
|
||||
@@ -1735,8 +1726,8 @@ VirtualGPU::submitKernelInternalHSA(
|
||||
|
||||
// setup the storage for the memory pointers of the kernel parameters
|
||||
uint numParams = kernel.signature().numParameters();
|
||||
if (useHwDebug_) {
|
||||
dev().hwDebugMgr()->allocParamMemList(numParams);
|
||||
if (dbgManager) {
|
||||
dbgManager->allocParamMemList(numParams);
|
||||
}
|
||||
|
||||
// Program the kernel arguments for the GPU execution
|
||||
@@ -1768,7 +1759,7 @@ VirtualGPU::submitKernelInternalHSA(
|
||||
HwDbgKernelInfo kernelInfo;
|
||||
HwDbgKernelInfo *pKernelInfo = NULL;
|
||||
|
||||
if (useHwDebug_) {
|
||||
if (dbgManager) {
|
||||
buildKernelInfo(hsaKernel, aqlPkt, kernelInfo, enqueueEvent);
|
||||
pKernelInfo = &kernelInfo;
|
||||
}
|
||||
@@ -1778,10 +1769,8 @@ VirtualGPU::submitKernelInternalHSA(
|
||||
runAqlDispatch(gpuEvent, aqlPkt, vmMems(), cal_.memCount_,
|
||||
scratch, scratchOffset, hsaKernel.cpuAqlCode(), hsaQueueMem_->vmAddress(), pKernelInfo);
|
||||
|
||||
if (useHwDebug_) {
|
||||
if (NULL != dev().hwDebugMgr()->postDispatchCallBackFunc()) {
|
||||
dev().hwDebugMgr()->executePostDispatchCallBack();
|
||||
}
|
||||
if (dbgManager && (NULL != dbgManager->postDispatchCallBackFunc())) {
|
||||
dbgManager->executePostDispatchCallBack();
|
||||
}
|
||||
|
||||
if (hsaKernel.dynamicParallelism()) {
|
||||
|
||||
Reference in New Issue
Block a user