Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions projects/clr/hipamd/src/hip_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@ hipError_t hipEventRecord_common(hipEvent_t event, hipStream_t stream, unsigned
hip::Event* e = reinterpret_cast<hip::Event*>(event);
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
hip::Stream* hip_stream = hip::getStream(stream);
if (hipStream_t lastCaptureStream = e->GetCaptureStream()) {
if (hip::isValid(lastCaptureStream)) {
if ((lastCaptureStream != nullptr) && (lastCaptureStream != hipStreamLegacy)) {
reinterpret_cast<hip::Stream*>(e->GetCaptureStream())->EraseCaptureEvent(event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It Should get cleared during end capture.

Copy link
Contributor

@anugodavar anugodavar Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense if same event is used again to record during capture.

}
}
}
e->SetCaptureStream(stream);
if ((stream != nullptr && stream != hipStreamLegacy) &&
(s->GetCaptureStatus() == hipStreamCaptureStatusActive)) {
Expand Down