()
| 253 | |
| 254 | |
| 255 | def test_emit_te(): |
| 256 | @I.ir_module(s_tir=True) |
| 257 | class EmitTE: |
| 258 | @R.function |
| 259 | def main(x: R.Tensor((10, 20), "float32")) -> R.Tensor((10, 20), dtype="float32"): |
| 260 | lv1 = R.emit_te(topi.add, x, x) |
| 261 | out = R.emit_te(topi.multiply, lv1, lv1) |
| 262 | return out |
| 263 | |
| 264 | bb = relax.BlockBuilder() |
| 265 | x = relax.Var("x", relax.TensorStructInfo([10, 20], "float32")) |
| 266 | with bb.function("main", [x], {"global_symbol": "main"}): |
| 267 | lv1 = bb.emit_te(topi.add, x, x) |
| 268 | out = bb.emit_te(topi.multiply, lv1, lv1) |
| 269 | bb.emit_func_output(out) |
| 270 | |
| 271 | _check(EmitTE, bb.get()) |
| 272 | |
| 273 | |
| 274 | def test_module_with_attr_and_global_info(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…