Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Avoid recursion error in profiling
  • Loading branch information
xadupre committed Dec 20, 2024
commit b94eb3f440ef8b89be97634d2552ce77473b8d02
4 changes: 2 additions & 2 deletions onnx_array_api/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def _get_root(node, stor=None):
stor.append(node)
if not node.called_by:
return node
if len(node.called_by) == 1:
return _get_root(node.called_by[0], stor=stor)
if len(node.called_by) == 0:
return None
res = None
for ct in node.called_by:
k = id(node), id(ct)
Expand Down