Skip to content

Commit 78b8f5c

Browse files
authored
[SYCL] Add check for empty nodes in check_for_arg()
- Empty nodes have no args so prevent calling has_arg() for them. - Fixes failure in RecordReplay/sub_graph_reduction
1 parent bccf3ed commit 78b8f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/source/detail/graph_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ bool check_for_arg(const sycl::detail::ArgDesc &Arg,
6060
SuccessorAddedDep |= check_for_arg(Arg, Successor, Deps);
6161
}
6262

63-
if (Deps.find(CurrentNode) == Deps.end() && CurrentNode->has_arg(Arg) &&
64-
!SuccessorAddedDep) {
63+
if (!CurrentNode->is_empty() && Deps.find(CurrentNode) == Deps.end() &&
64+
CurrentNode->has_arg(Arg) && !SuccessorAddedDep) {
6565
Deps.insert(CurrentNode);
6666
return true;
6767
}

0 commit comments

Comments
 (0)