Skip to content

Commit c5a2f7e

Browse files
committed
Check if tensor.inputs is non-empty
Signed-off-by: gcunhase <[email protected]>
1 parent 752fdf2 commit c5a2f7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modelopt/onnx/quantization/graph_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _get_backbone(root: Node):
190190
return root
191191

192192
for tensor in root.inputs:
193-
if not isinstance(tensor, Constant):
193+
if not isinstance(tensor, Constant) and tensor.inputs:
194194
parent_node = tensor.inputs[0]
195195
bb = _get_backbone(parent_node)
196196
if bb:

0 commit comments

Comments
 (0)