Skip to content

Commit dac740d

Browse files
committed
address comments
1 parent b7b57f0 commit dac740d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lighthouse/dialects/transform/transform_ext/utils/contraction_normalization.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def _emit_scale(contraction: ir.OpView, scale_info: ScaleInfo, downstream: list[
305305

306306
def _empty_like(value: ir.Value) -> ir.Value:
307307
shaped = ir.ShapedType(value.type)
308+
# A dynamic dim would need a `tensor.dim` to size the empty; not supported yet.
309+
assert shaped.has_static_shape, f"expected a static shape, got {value.type}"
308310
return tensor.empty(
309311
[shaped.get_dim_size(i) for i in range(shaped.rank)], shaped.element_type
310312
)

0 commit comments

Comments
 (0)