Hi, I notice that Convert Layout pass can change some specific operators layout for example conv2d, if I want to change all operators’s layout, such as NHWC
→ NCHW
,
and the constant weight will change automatically, does tvm have some pass to do that?
Or I need to give a long map which contains operators’ name and their desired layout, and use convert layout pass, by the way, I have tried like this:
Map<String, Array<String>> layout_map{{"nn.conv2d", {"NCHW", "default"}},
{"nn.dense", {"NCHW", "default"}}};
mod = transform::ConvertLayout(layout_map)(mod);
and the original layout is NHWC
, but it doesn’t change the layout of nn.dense
, only works on nn.conv2d
. Any advice? Thanks!