()
| 1096 | |
| 1097 | |
| 1098 | def test_logical_xor(): |
| 1099 | class LogicalXor(Module): |
| 1100 | def forward(self, lhs, rhs): |
| 1101 | return torch.logical_xor(lhs, rhs) |
| 1102 | |
| 1103 | @tvm.script.ir_module |
| 1104 | class expected: |
| 1105 | @R.function |
| 1106 | def main( |
| 1107 | lhs: R.Tensor((1, 3, 10, 10), dtype="float32"), |
| 1108 | rhs: R.Tensor((1, 3, 10, 10), dtype="float32"), |
| 1109 | ) -> R.Tuple(R.Tensor((1, 3, 10, 10), dtype="bool")): |
| 1110 | # block 0 |
| 1111 | with R.dataflow(): |
| 1112 | lv: R.Tensor((1, 3, 10, 10), dtype="bool") = R.astype(lhs, dtype="bool") |
| 1113 | lv1: R.Tensor((1, 3, 10, 10), dtype="bool") = R.astype(rhs, dtype="bool") |
| 1114 | lv2: R.Tensor((1, 3, 10, 10), dtype="bool") = R.logical_xor(lv, lv1) |
| 1115 | gv: R.Tuple(R.Tensor((1, 3, 10, 10), dtype="bool")) = (lv2,) |
| 1116 | R.output(gv) |
| 1117 | return gv |
| 1118 | |
| 1119 | example_args = ( |
| 1120 | torch.randn(1, 3, 10, 10, dtype=torch.float32), |
| 1121 | torch.randn(1, 3, 10, 10, dtype=torch.float32), |
| 1122 | ) |
| 1123 | verify_model(LogicalXor(), example_args, {}, expected) |
| 1124 | |
| 1125 | |
| 1126 | def test_pow_integer(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…