SWDEV-313680 - hipGraphAddKernelNode invalid cases
Change-Id: I4c87c5dd80cd3f78f5c38b2d3447b03b91ffa656
This commit is contained in:
@@ -48,6 +48,8 @@ const char* GetGraphNodeTypeString(uint32_t op) {
|
||||
int hipGraphNode::nextID = 0;
|
||||
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"};
|
||||
|
||||
hipError_t hipGraphMemcpyNode1D::ValidateParams(void* dst, const void* src, size_t count,
|
||||
hipMemcpyKind kind) {
|
||||
@@ -467,6 +469,16 @@ hipError_t hipGraphMemcpyNode::SetCommandParams(const hipMemcpy3DParms* pNodePar
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
|
||||
bool ihipGraph::isGraphValid(ihipGraph* pGraph) {
|
||||
amd::ScopedLock lock(graphSetLock_);
|
||||
if (graphSet_.find(pGraph) == graphSet_.end()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ihipGraph::AddNode(const Node& node) {
|
||||
vertices_.emplace_back(node);
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_CODE, "[hipGraph] Add %s(%p)\n",
|
||||
|
||||
Reference in New Issue
Block a user