I’m not sure I understand your question. Relay expression and TE expression are at different levels. For example T_dense
is a TE tensor compute, which corresponds to one Relay op (e.g., nn.dense
). On the other hand, TE compute can also be a result of a sequence of Relay ops. For example T_dense[ax0, ax1] + placeholder[ax1]
can be lowered from nn.bias_add(nn.dense(x, w), b)
.
In short, automatically generate nn.bias_add(nn.dense(x, w), b)
from T_dense[ax0, ax1] + placeholder[ax1]
seems impossible to me. You probably can only do it manually.