(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]])
| 784 | |
| 785 | @register_lower_rule(mops.Where) |
| 786 | def where_lower(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]]): |
| 787 | assert len(args) == 3 and len(ctx.vars_in) == 3 and len(ctx.vars_out) == 1 |
| 788 | assert _shape_equal(ctx.vars_in[0].shape, ctx.vars_in[1].shape) and _shape_equal( |
| 789 | ctx.vars_in[0].shape, ctx.vars_in[2].shape |
| 790 | ) |
| 791 | return where(args[0], args[1], args[2]) |
| 792 | |
| 793 | |
| 794 | @register_lower_rule("WhereBackward", mops.WhereBackward) |
nothing calls this directly
no test coverage detected