From 36197f49cf0c082714d2afe0139e11e47c33805d Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 4 Jun 2015 18:06:46 -0400 Subject: [PATCH] P4 to Git Change 1158054 by gandryey@gera-dev-w7 on 2015/06/04 17:53:55 ECR #304775 - Fix for a memory "leak" in one GEHC sample - The app builds a dependency graph when the new command waits for the previous one. Our runtime couldn't release wait commands in this situation, because release is done in the command destructor. Release the events from the wait list when the command is done. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#71 edit [ROCm/clr commit: e0b2a44b3f8be8b03509dd12aa7718ac3e29f641] --- projects/clr/rocclr/runtime/platform/command.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/projects/clr/rocclr/runtime/platform/command.cpp b/projects/clr/rocclr/runtime/platform/command.cpp index cf2cbfe0f5..4cd2497c06 100644 --- a/projects/clr/rocclr/runtime/platform/command.cpp +++ b/projects/clr/rocclr/runtime/platform/command.cpp @@ -218,6 +218,11 @@ Command::Command( } Command::~Command() +{ +} + +void +Command::releaseResources() { const Command::EventWaitList& events = eventWaitList(); @@ -228,12 +233,6 @@ Command::~Command() std::mem_fun(&Command::release)); } -void -Command::releaseResources() -{ -} - - void Command::enqueue() {