SWDEV-313503 - Returns appropriate error code when destroyed exec graphs are launched

Change-Id: I3ca025494fd27f9ed0cd4534c740f7e19e1c66b3


[ROCm/clr commit: 0ae70a4c8d]
This commit is contained in:
Sourabh Betigeri
2022-03-07 12:08:26 -08:00
committed by Sourabh Betigeri
vanhempi 42be9301d1
commit fabd92b996
3 muutettua tiedostoa jossa 22 lisäystä ja 2 poistoa
@@ -51,6 +51,8 @@ std::unordered_set<hipGraphNode*> hipGraphNode::nodeSet_;
amd::Monitor hipGraphNode::nodeSetLock_{"Guards global node set"};
std::unordered_set<ihipGraph*> ihipGraph::graphSet_;
amd::Monitor ihipGraph::graphSetLock_{"Guards global graph set"};
std::unordered_set<hipGraphExec*> hipGraphExec::graphExecSet_;
amd::Monitor hipGraphExec::graphExecSetLock_{"Guards global exec graph set"};
hipError_t hipGraphMemcpyNode1D::ValidateParams(void* dst, const void* src, size_t count,
hipMemcpyKind kind) {
@@ -673,6 +675,14 @@ ihipGraph* ihipGraph::clone() const{
return clone(clonedNodes);
}
bool hipGraphExec::isGraphExecValid(hipGraphExec* pGraphExec) {
amd::ScopedLock lock(graphExecSetLock_);
if (graphExecSet_.find(pGraphExec) == graphExecSet_.end()) {
return false;
}
return true;
}
hipError_t hipGraphExec::CreateQueues(size_t numQueues) {
parallelQueues_.reserve(numQueues);
for (size_t i = 0; i < numQueues; i++) {