SWDEV-313503 - Returns appropriate error code when destroyed exec graphs are launched
Change-Id: I3ca025494fd27f9ed0cd4534c740f7e19e1c66b3
This commit is contained in:
committato da
Sourabh Betigeri
parent
74beb4583c
commit
0ae70a4c8d
@@ -290,6 +290,8 @@ struct hipGraphExec {
|
||||
uint currentQueueIndex_;
|
||||
std::unordered_map<Node, Node> clonedNodes_;
|
||||
amd::Command* lastEnqueuedCommand_;
|
||||
static std::unordered_set<hipGraphExec*> graphExecSet_;
|
||||
static amd::Monitor graphExecSetLock_ ;
|
||||
|
||||
public:
|
||||
hipGraphExec(std::vector<Node>& levelOrder, std::vector<std::vector<Node>>& lists,
|
||||
@@ -300,7 +302,10 @@ struct hipGraphExec {
|
||||
nodeWaitLists_(nodeWaitLists),
|
||||
clonedNodes_(clonedNodes),
|
||||
lastEnqueuedCommand_(nullptr),
|
||||
currentQueueIndex_(0) {}
|
||||
currentQueueIndex_(0) {
|
||||
amd::ScopedLock lock(graphExecSetLock_);
|
||||
graphExecSet_.insert(this);
|
||||
}
|
||||
|
||||
~hipGraphExec() {
|
||||
// new commands are launched for every launch they are destroyed as and when command is
|
||||
@@ -309,6 +314,8 @@ struct hipGraphExec {
|
||||
queue->release();
|
||||
}
|
||||
for (auto it = clonedNodes_.begin(); it != clonedNodes_.end(); it++) delete it->second;
|
||||
amd::ScopedLock lock(graphExecSetLock_);
|
||||
graphExecSet_.erase(this);
|
||||
}
|
||||
|
||||
Node GetClonedNode(Node node) {
|
||||
@@ -321,6 +328,9 @@ struct hipGraphExec {
|
||||
return clonedNode;
|
||||
}
|
||||
|
||||
// check executable graphs validity
|
||||
static bool isGraphExecValid(hipGraphExec* pGraphExec);
|
||||
|
||||
std::vector<Node>& GetNodes() { return levelOrder_; }
|
||||
|
||||
amd::HostQueue* GetAvailableQueue() { return parallelQueues_[currentQueueIndex_++]; }
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user