Skip to content

Commit

Permalink
dp: fix cost_cap check
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Nov 3, 2020
1 parent ff0fc52 commit c75b8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opt_einsum/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ def __call__(self, inputs, output, size_dict, memory_limit=None):
xn, g, all_tensors, inputs, i1_cut_i2_wo_output,
memory_limit, cntrct1, cntrct2)

if (cost_cap >= naive_cost) and (len(x[-1]) == 0):
if (cost_cap > naive_cost) and (len(x[-1]) == 0):
raise RuntimeError("No contraction found for given `memory_limit`.")

# increase cost cap for next iteration:
Expand Down

0 comments on commit c75b8e7

Please sign in to comment.