(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]])
| 725 | |
| 726 | @register_lower_rule(mops.FillLike) |
| 727 | def fill_like_lower(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]]): |
| 728 | assert len(args) == 1 and len(ctx.vars_in) == 1 and len(ctx.vars_out) == 1 |
| 729 | var_in, var_out, opr = ctx.vars_in[0], ctx.vars_out[0], ctx.op |
| 730 | value = opr.value |
| 731 | |
| 732 | assert _shape_equal(var_in.shape, var_out.shape) and _shape_equal( |
| 733 | var_out.shape, args[0].shape |
| 734 | ) |
| 735 | assert var_in.dtype == var_out.dtype and args[0].dtype == var_out.dtype |
| 736 | shape, dtype = var_out.shape, var_out.dtype |
| 737 | |
| 738 | return fill(value, shape, dtype) |
| 739 | |
| 740 | |
| 741 | @register_lower_rule(mops.Reshape) |
nothing calls this directly
no test coverage detected