()
| 1045 | |
| 1046 | |
| 1047 | def test_logical_not(): |
| 1048 | class LogicalNot(Module): |
| 1049 | def forward(self, input): |
| 1050 | return torch.logical_not(input) |
| 1051 | |
| 1052 | @tvm.script.ir_module |
| 1053 | class expected: |
| 1054 | @R.function |
| 1055 | def main(input: R.Tensor((1, 3, 10, 10), dtype="float32")) -> R.Tuple( |
| 1056 | R.Tensor((1, 3, 10, 10), dtype="bool") |
| 1057 | ): |
| 1058 | # block 0 |
| 1059 | with R.dataflow(): |
| 1060 | lv: R.Tensor((1, 3, 10, 10), dtype="bool") = R.astype(input, dtype="bool") |
| 1061 | lv1: R.Tensor((1, 3, 10, 10), dtype="bool") = R.logical_not(lv) |
| 1062 | gv: R.Tuple(R.Tensor((1, 3, 10, 10), dtype="bool")) = (lv1,) |
| 1063 | R.output(gv) |
| 1064 | return gv |
| 1065 | |
| 1066 | example_args = (torch.randn(1, 3, 10, 10, dtype=torch.float32),) |
| 1067 | verify_model(LogicalNot(), example_args, {}, expected) |
| 1068 | |
| 1069 | |
| 1070 | def test_logical_or(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…