Skip to content

Commit

Permalink
Add len(indices) == 1 check to fix incorrect mapping of multi-indexin…
Browse files Browse the repository at this point in the history
…g in TVM logic
  • Loading branch information
kamalrajkannan78 committed Dec 3, 2024
1 parent 24e1c49 commit 73c0dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,7 @@ def index(self, inputs, input_types):

return res

elif len(_infer_shape(data)) > 2 :
elif len(_infer_shape(data)) > 2 and len(indices) == 1:
axis = None
index_expr = None
for i, idx in enumerate(indices):
Expand Down

0 comments on commit 73c0dd5

Please sign in to comment.