How to lower relay built modules?

Thanks for the pointer. The tutorial is for how to bind platform specific te/tir with relay operator. If now I have a relay model,

x = relay.var("x", shape=[1, 10])
w = relay.var("w", shape=[20, 10])
y = relay.dense(x, w)
fn = relay.Function([x, w], y)
mod = tvm.IRModule.from_expr(fn)

How can I lower such expression / module to platform specific TE/TIR, for example, targeting CPU and use “llvm” as the platform.

1 Like