SWDEV-374389 - correct update dependency behaviour
- nodes should belong to graph - num of passed dependency cant be larger than graph nodes Signed-off-by: sdashmiz <shadi.dashmiz@amd.com> Change-Id: Ia6f2283546bc44edee705b0483bfe506b7b1177a
Šī revīzija ir iekļauta:
revīziju iesūtīja
Shadi Dashmiz
vecāks
1f4176062b
revīzija
23edcd3e23
@@ -1674,13 +1674,19 @@ hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t
|
||||
if (s->GetCaptureStatus() == hipStreamCaptureStatusNone) {
|
||||
HIP_RETURN(hipErrorIllegalState);
|
||||
}
|
||||
if ((numDependencies > 0 && dependencies == nullptr) ||
|
||||
if ((s->GetCaptureGraph()->GetNodeCount() < numDependencies) ||
|
||||
(numDependencies > 0 && dependencies == nullptr) ||
|
||||
(flags != 0 && flags != hipStreamAddCaptureDependencies &&
|
||||
flags != hipStreamSetCaptureDependencies)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
std::vector<hipGraphNode_t> depNodes;
|
||||
const std::vector<hipGraphNode_t>& graphNodes = s->GetCaptureGraph()->GetNodes();
|
||||
for (int i = 0; i < numDependencies; i++) {
|
||||
if ((dependencies[i] == nullptr) ||
|
||||
std::find(std::begin(graphNodes), std::end(graphNodes), dependencies[i]) == std::end(graphNodes)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
depNodes.push_back(dependencies[i]);
|
||||
}
|
||||
if (flags == hipStreamAddCaptureDependencies) {
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user