(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]])
| 729 | |
| 730 | @register_lower_rule(mops.Softmax) |
| 731 | def softmax_lower(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]]): |
| 732 | assert ( |
| 733 | len(args) == 1 and len(ctx.vars_in) == 1 and len(ctx.vars_out) == 1 |
| 734 | ), f"{len(args)}, {len(ctx.vars_in)}, {len(ctx.vars_out)}" |
| 735 | return softmax(args[0], ctx.op.axis) |
| 736 | |
| 737 | |
| 738 | @register_lower_rule("SoftmaxBackward") |