SWDEV-365587 - reuse the id from capturing stream
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I65f5be3fcc4cffcf3eb5762fd0b43fd051c145c2
[ROCm/clr commit: b665b9a6e8]
Этот коммит содержится в:
коммит произвёл
Shadi Dashmiz
родитель
26a1c72182
Коммит
bafdaa4f31
@@ -774,6 +774,7 @@ hipError_t capturehipStreamWaitEvent(hipEvent_t& event, hipStream_t& stream, uns
|
||||
}
|
||||
if (!s->IsOriginStream()) {
|
||||
s->SetCaptureGraph(reinterpret_cast<hip::Stream*>(e->GetCaptureStream())->GetCaptureGraph());
|
||||
s->SetCaptureId(reinterpret_cast<hip::Stream*>(e->GetCaptureStream())->GetCaptureID());
|
||||
s->SetCaptureMode(reinterpret_cast<hip::Stream*>(e->GetCaptureStream())->GetCaptureMode());
|
||||
s->SetParentStream(e->GetCaptureStream());
|
||||
reinterpret_cast<hip::Stream*>(s->GetParentStream())->SetParallelCaptureStream(stream);
|
||||
@@ -863,6 +864,7 @@ hipError_t hipStreamBeginCapture_common(hipStream_t stream, hipStreamCaptureMode
|
||||
}
|
||||
|
||||
s->SetCaptureGraph(new ihipGraph());
|
||||
s->SetCaptureId();
|
||||
s->SetCaptureMode(mode);
|
||||
s->SetOriginStream();
|
||||
if (mode != hipStreamCaptureModeRelaxed) {
|
||||
|
||||
@@ -338,9 +338,15 @@ namespace hip {
|
||||
void SetCaptureGraph(hipGraph_t pGraph) {
|
||||
pCaptureGraph_ = pGraph;
|
||||
captureStatus_ = hipStreamCaptureStatusActive;
|
||||
}
|
||||
void SetCaptureId() {
|
||||
// ID is generated in Begin Capture i.e.. when capture status is active
|
||||
captureID_ = GenerateCaptureID();
|
||||
}
|
||||
void SetCaptureId(unsigned long long captureId) {
|
||||
// ID is given from parent stream
|
||||
captureID_ = captureId;
|
||||
}
|
||||
/// reset capture parameters
|
||||
hipError_t EndCapture();
|
||||
/// Set capture status
|
||||
|
||||
Ссылка в новой задаче
Block a user