SWDEV-301667 - Port optimization to save extra packet to graphs

Change-Id: Ibaf64a4efe070c42620e6e153c1862a4a0b15664


[ROCm/clr commit: e1e5d071ba]
This commit is contained in:
Saleel Kudchadker
2023-08-22 09:58:48 -07:00
parent cab71e6e00
commit d7a63b9d66
5 changed files with 99 additions and 72 deletions
+2 -2
View File
@@ -383,8 +383,6 @@ hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop) {
}
hipError_t hipEventRecord_common(hipEvent_t event, hipStream_t stream) {
ClPrint(amd::LOG_INFO, amd::LOG_API,
"[hipGraph] current capture node EventRecord on stream : %p, Event %p", stream, event);
hipError_t status = hipSuccess;
if (event == nullptr) {
return hipErrorInvalidHandle;
@@ -398,6 +396,8 @@ hipError_t hipEventRecord_common(hipEvent_t event, hipStream_t stream) {
hip::Stream* hip_stream = hip::getStream(stream);
e->SetCaptureStream(stream);
if ((s != nullptr) && (s->GetCaptureStatus() == hipStreamCaptureStatusActive)) {
ClPrint(amd::LOG_INFO, amd::LOG_API,
"[hipGraph] Current capture node EventRecord on stream : %p, Event %p", stream, event);
s->SetCaptureEvent(event);
std::vector<hip::GraphNode*> lastCapturedNodes = s->GetLastCapturedNodes();
if (!lastCapturedNodes.empty()) {