(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]])
| 805 | |
| 806 | @register_lower_rule(mops.Linspace) |
| 807 | def linspace_lower(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]]): |
| 808 | assert len(args) == 3 and len(ctx.vars_in) == 3 and len(ctx.vars_out) == 1 |
| 809 | assert len(ctx.vars_out[0].shape) == 1, "linspace/arange only support 1D" |
| 810 | |
| 811 | odtype, oshape = ctx.vars_out[0].dtype, ctx.vars_out[0].shape |
| 812 | return linspace(args[0], args[1], args[2], odtype, oshape) |
nothing calls this directly
no test coverage detected