(x: R.Tensor((2, 3), "float32"), y: R.Tensor((2, 3), "float32"))
| 1089 | def test_local_function(): |
| 1090 | @R.function |
| 1091 | def main(x: R.Tensor((2, 3), "float32"), y: R.Tensor((2, 3), "float32")) -> R.Tensor( |
| 1092 | (2, 3), "float32" |
| 1093 | ): |
| 1094 | @R.function |
| 1095 | def outer_func( |
| 1096 | c1: R.Tensor((2, 3), "float32"), |
| 1097 | ) -> R.Callable((R.Tensor(None, "float32", ndim=2),), R.Tensor(None, "float32", ndim=2)): |
| 1098 | @R.function |
| 1099 | def inner_func(x1: R.Tensor((2, 3), "float32")): |
| 1100 | s: R.Tensor((2, 3), "float32") = R.add(x1, c1) |
| 1101 | return s |
| 1102 | |
| 1103 | return inner_func |
| 1104 | |
| 1105 | in_call = outer_func(x) |
| 1106 | res = in_call(y) |
| 1107 | return res |
| 1108 | |
| 1109 | main_bindings = main.body.blocks[0].bindings |
| 1110 | assert len(main_bindings) == 3 |
nothing calls this directly
no test coverage detected
searching dependent graphs…