P4 to Git Change 1582433 by gandryey@gera-w8 on 2018/07/18 17:23:28
SWDEV-155438 - Produce RGP Queue Timings chunk for OpenCL RGP files
- Register SDMA queue in order to get SDMA timing. The RGP trace capture with SDMA may cause a HW hang occasionally
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#115 edit
[ROCm/clr commit: 8c44442f90]
Этот коммит содержится в:
@@ -149,7 +149,8 @@ bool RgpCaptureMgr::Init(Pal::IPlatform* platform)
|
||||
// ================================================================================================
|
||||
// This function finds out all the queues in the device that we have to synchronize for RGP-traced
|
||||
// frames and initializes resources for them.
|
||||
bool RgpCaptureMgr::RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const
|
||||
bool RgpCaptureMgr::RegisterTimedQueue(
|
||||
uint32_t queue_id, Pal::IQueue* iQueue, bool* debug_vmid) const
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
@@ -157,14 +158,14 @@ bool RgpCaptureMgr::RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const
|
||||
// it may be optional for Vulkan, but we provide it anyway if available).
|
||||
Pal::KernelContextInfo kernelContextInfo = {};
|
||||
|
||||
Pal::Result palResult = gpu->queue(MainEngine).iQueue_->QueryKernelContextInfo(&kernelContextInfo);
|
||||
Pal::Result palResult = iQueue->QueryKernelContextInfo(&kernelContextInfo);
|
||||
|
||||
// Ensure we've acquired the debug VMID (note that some platforms do not
|
||||
// implement this function, so don't fail the whole trace if so)
|
||||
*debug_vmid = kernelContextInfo.flags.hasDebugVmid;
|
||||
|
||||
// Register the queue with the GPA session class for timed queue operation support.
|
||||
if (trace_.gpa_session_->RegisterTimedQueue(gpu->queue(MainEngine).iQueue_, gpu->index(),
|
||||
if (trace_.gpa_session_->RegisterTimedQueue(iQueue, queue_id,
|
||||
kernelContextInfo.contextIdentifier) != Pal::Result::Success) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
|
||||
void WriteBarrierStartMarker(const Pal::Developer::BarrierData& data) const;
|
||||
void WriteBarrierEndMarker(const Pal::Developer::BarrierData& data) const;
|
||||
bool RegisterTimedQueue(VirtualGPU* gpu, bool* debug_vmid) const;
|
||||
bool RegisterTimedQueue(uint32_t queue_id, Pal::IQueue* iQueue, bool* debug_vmid) const;
|
||||
Pal::Result TimedQueueSubmit(
|
||||
Pal::IQueue* queue, uint64_t cmdId, const Pal::SubmitInfo& submitInfo) const;
|
||||
|
||||
|
||||
@@ -914,7 +914,8 @@ bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs,
|
||||
if ((index() != 0) && dev().rgpCaptureMgr() != nullptr) {
|
||||
bool dbg_vmid = false;
|
||||
state_.rgpCaptureEnabled_ = true;
|
||||
dev().rgpCaptureMgr()->RegisterTimedQueue(this, &dbg_vmid);
|
||||
dev().rgpCaptureMgr()->RegisterTimedQueue(2 * index(), queue(MainEngine).iQueue_, &dbg_vmid);
|
||||
dev().rgpCaptureMgr()->RegisterTimedQueue(2 * index() + 1, queue(SdmaEngine).iQueue_, &dbg_vmid);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Ссылка в новой задаче
Block a user