Skip to content

Commit 72314c6

Browse files
committed
Missing from the previous commit: LUB computation in dim_ineq
1 parent 75e8fbc commit 72314c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tensor/row.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,8 +2079,10 @@ let%track5_sexp solve_dim_ineq ~(stage : stage) origin ~(cur : dim) ~(subr : dim
20792079
let origin = merge_origins origin origin2 in
20802080
let lub, lub_forcing =
20812081
match (cur, lub2) with
2082-
| Dim { d = d1; _ }, Dim { d = d2; _ } when d1 = d2 -> (cur, [])
2083-
| Dim _, Dim _ (* when d1 <> d2 *) ->
2082+
| Dim { d = d1; label = l1; _ }, Dim { d = d2; label = l2; _ }
2083+
when d1 = d2 && Option.equal String.equal l1 l2 ->
2084+
(cur, [])
2085+
| Dim _, Dim _ (* when d1 <> d2 or l1 <> l2 *) ->
20842086
let lub = get_dim ~d:1 ~proj_id:47 () in
20852087
(lub, [ Dim_eq { d1 = subr; d2 = lub; origin } ])
20862088
(* raise @@ Shape_error ( "dimension comparison for axis: upper bound mismatch", [

0 commit comments

Comments
 (0)