[BYOC][ACL] Unexpected layout transform op after graph partitioning

Hi @mgeek, it seems as though the constants aren’t bound to the function you are running and are instead being treated similar to a variable input. For this reason constant folding will not work and this is why the layout_transform operator remains. After importing your model from a frontend, but before partitioning for ACL, I would suggest running the bind_params_by_name pass - there is a short example which might help here: Constant params should be constants - #3 by lhutton1. After running this you should see the params appear as Constant[] when printing the Relay module.

I would also recommend taking a look at the user-facing TVMC Python interface, which should automatically take care of these types of issues.

1 Like