Merge "HPC : Intermittent hangs are observed while running Gromacs benchmarks" into amd-master-next

このコミットが含まれているのは:
Christophe Paquot
2020-05-12 11:21:47 -04:00
committed by Gerrit Code Review
コミット 538f18f06c
+4 -4
ファイルの表示
@@ -23,7 +23,7 @@
#include "hip_event.hpp" #include "hip_event.hpp"
#include "thread/monitor.hpp" #include "thread/monitor.hpp"
static amd::Monitor streamSetLock("Guards global stream set"); static amd::Monitor streamSetLock{"Guards global stream set"};
static std::unordered_set<hip::Stream*> streamSet; static std::unordered_set<hip::Stream*> streamSet;
// Internal structure for stream callback handler // Internal structure for stream callback handler
@@ -83,11 +83,11 @@ amd::HostQueue* Stream::asHostQueue(bool skip_alloc) {
// ================================================================================================ // ================================================================================================
void Stream::Destroy() { void Stream::Destroy() {
if (queue_ != nullptr) { if (queue_ != nullptr) {
queue_->release();
queue_ = nullptr;
amd::ScopedLock lock(streamSetLock); amd::ScopedLock lock(streamSetLock);
streamSet.erase(this); streamSet.erase(this);
queue_->release();
queue_ = nullptr;
} }
delete this; delete this;
} }