Does it make sense to add LegalizeOps to the list of passes run in relax.build? Looks like we’ve had multiple questions with the same confusion like:
I tested the DefaultGPUSchedule(),meta_schedule and the dlight module, which was cool but only for TensorIR Function, not for Relax Function. Is there any API or Pass which could map Pure Relax IRModule to intrinsic TE(use Relax frontend, not with relay_translator.from_relay()).
there is a draft I have made, and an end2end module load->transform->build->run pipeline is what I needed.
[relax_e2e.drawio]
If we load Torch/ONNX model to relax by first to relay and transform with “relay_translato…
Hi,
I try to build relax module with below script:
with tvm.transform.PassContext(config={"relax.backend.use_cuda_graph": False}):
ex = relax.build(mod, "cuda")
Then it report error:
CodeGenVM cannot handle this intrinsic now
Op(relax.permute_dims)
Does it mean that relax currently don’t support permute_dims?
Relax IR is as:
@I.ir_module
class Module:
I.module_attrs({"external_mods": [metadata["runtime.Module"][0]]})
@R.function
def main(x1: R.Tensor((1, 11, 200, 200), dty…
Hello,
When I am trying to do relax.build on the IRModule from tests/python/relax/test_transform_alter_op_impl.py example, I am noticing build errors saying that the codegen support for the intrinsic(Op(relax.layout_transform)) is not handled.
Reduced test case:
from tvm import relax
from tvm.script import tir as T, ir as I, relax as R
@I.ir_module
class AddTest:
@T.prim_func
def relax_add_replacement(arg0: T.Buffer((4, 4), "float32"), arg1: T.Buffer((4, 4), "float32"), output: T.Bu…
I think it’s because, relay.build used to take care of running all the required passes, but in relax, only the lowering passes are run as part of relax.build and others have to be called explicitly.