Skip to content

Conversation

@masahi
Copy link
Member

@masahi masahi commented Mar 23, 2022

The ONNX frontend is written to produce a dynamic graph and it is expected that the DynamicToStatic pass be applied after model import to make thing as static as possible. Until now we are implicitly relying on users to take this assumption into account, but I believe it is better to run DynamicToStatic inside the frontend since it is practically required anyway. This is especially important since in #10691 I removed the "last minute fix-up".

For DynamicToStatic to work, freeze_param needs to be True. So I also changed its default value, but this can be reverted if there are some concerns in making freeze_param = True by default (which will disable DynamicToStatic too).

@mbrookhart @AndrewZhaoLuo @kparzysz-quic

@masahi masahi merged commit f368295 into apache:main Mar 24, 2022
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
apache#10750)

* [ONNX] make freeze_params=True and run DynamicToStatic by default

* remove convert_to_static in onnx test

* fixed qlinearconv conversion for freeze_params=True

* fixed assert msg placement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants