relax
relax copied to clipboard
Temp repo for prototyping relax(relay next), the effort will be upstreamed. We use the wiki pages on this repo to host design docs.
As discussed in the community meeting, `ExprMutator` and `ExprVisitor` somewhat confusingly also traverse binding blocks, which are _statements_ rather than expressions. What is even more interesting is that these inherit...
This thread discusses the design of Relax Pattern Language. ## 🎯 Progress and Questions *This section is pinged to show current progress. Please sklip this section if you are new...
```python from __future__ import annotations from tvm.script import relax as R, tir as T @R.function def bug(x: Tensor((32, 32), "float32")) -> Tensor: with R.dataflow(): lv0 = R.call_tir(my_relu, (x,), (32, 32),...
- [x] Lambda lift pass - [x] Support closure - [x] Add `relax.while_loop` similar to the current `relay.while_loop` (functional through recursion) - [x] TensorArray support: enable opaque Object type and...
The following test case results in a crash during VM code generation: ```python from __future__ import annotations import tvm from tvm import relax from tvm.script import relax as R @tvm.register_func("print_test")...
This test case works locally but results in weird behavior over RFC: ```python from __future__ import annotations import numpy as np import tvm from tvm.contrib import utils import tvm.script from...
The normalizer is unable to assign checked_type to the function call `output_foo = foo(x)`. Failing unit test: ``` def test_function_call(): @tvm.script.ir_module class InputMod: @R.function def foo(x: Tensor((2, 3), "float32")) ->...
Right now when we do `mod.script()` with multiple functions, the order is not deterministic and relax/tir function appears in interleaving way. We should: (a) sort by name (b) print TIR...
TVMScript is very useful to create Relax IRModule, especially for unit tests. However, since Relax does not have its own operator set yet, creating an IRModule with several well known...
Right now when we do emit_te, we generate parameters with prefix `rxplacholder`, which is not as informative and long. Would be good to change to shorter names, e.g. (X0, X1)...