(*indices)
| 633 | """ |
| 634 | |
| 635 | def _compute(*indices): |
| 636 | value = x(*indices) |
| 637 | const_min = ( |
| 638 | tvm.tirx.Cast(value.dtype, a_min) |
| 639 | if isinstance(a_min, PrimExpr) |
| 640 | else tvm.tirx.const(a_min, value.dtype) |
| 641 | ) |
| 642 | const_max = ( |
| 643 | tvm.tirx.Cast(value.dtype, a_max) |
| 644 | if isinstance(a_max, PrimExpr) |
| 645 | else tvm.tirx.const(a_max, value.dtype) |
| 646 | ) |
| 647 | return tvm.te.max(tvm.te.min(value, const_max), const_min) |
| 648 | |
| 649 | return te.compute(x.shape, _compute) |
| 650 |
nothing calls this directly
no test coverage detected
searching dependent graphs…