未验证 提交 82a7c33e 编写于 作者: X xiaoguoguo626807 提交者: GitHub

【prim】test composite rules with -1 shape (#51435)

* init

* modify
上级 c3f8ba9b
......@@ -634,6 +634,9 @@ def _lower_composite(
f'but orig_out.dtype={orig_out.dtype} and new_out.dtype={new_out.dtype}'
)
if orig_out.shape and new_out.shape:
assert (
-1 not in new_out.shape
), f'when replace origin op {op_name} with composite rule, composite out shape has -1.'
assert orig_out.shape == new_out.shape, (
f'when replace origin op {op_name} with composite rule, origin out shape should be equal to new out shape, '
f'but orig_out.shape={orig_out.shape} and new_out.shape={new_out.shape}'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册