Skip to content

Commit

Permalink
Optimize einsum when node[1].is_const() (#1739)
Browse files Browse the repository at this point in the history
Signed-off-by: xavier dupré <[email protected]>

Co-authored-by: xavier dupré <[email protected]>
  • Loading branch information
xadupre and sdpython authored Oct 8, 2021
1 parent 5770433 commit 4245d8d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tf2onnx/optimizer/einsum_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2291,8 +2291,6 @@ def _optimize_at_current_graph_level(self, graph):

def _optimize_einsum(self, node, graph):
"""Apply the optimizer."""
if node.inputs[1].is_const():
return False
inp_shape = graph.get_shape(node.input[0])
if inp_shape is None:
# The rank must be known
Expand Down

0 comments on commit 4245d8d

Please sign in to comment.