SWDEV-375596 - Device context should not be changed while graph exec update for graph nodes other than empty and host node.

Change-Id: I89d734b111aae5b042386175d2786ce9002771b9
이 커밋은 다음에 포함됨:
Jaydeep Patel 작성하고 Jaydeepkumar Patel가 2023-08-27 22:58:32 -04:00를 커밋함
1 부모 1ec0ba3537
커밋 d2655d84fd
1 파일이 변경됨
+9
+9
파일 보기
@@ -2232,6 +2232,15 @@ hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph,
}
for (std::vector<hip::GraphNode*>::size_type i = 0; i != newGraphNodes.size(); i++) {
if (newGraphNodes[i]->GetType() == oldGraphExecNodes[i]->GetType()) {
if (newGraphNodes[i]->GetType() != hipGraphNodeTypeHost &&
newGraphNodes[i]->GetType() != hipGraphNodeTypeEmpty) {
if (newGraphNodes[i]->GetParentGraph()->device_ !=
oldGraphExecNodes[i]->GetParentGraph()->device_) {
*updateResult_out = hipGraphExecUpdateErrorUnsupportedFunctionChange;
*hErrorNode_out = reinterpret_cast<hipGraphNode_t>(newGraphNodes[i]);
return hipErrorGraphExecUpdateFailure;
}
}
hipError_t status = oldGraphExecNodes[i]->SetParams(newGraphNodes[i]);
if (status != hipSuccess) {
*hErrorNode_out = reinterpret_cast<hipGraphNode_t>(newGraphNodes[i]);