kevinthesun edited a comment on pull request #6449: URL: https://github.com/apache/incubator-tvm/pull/6449#issuecomment-692975419
Original pt frontend just handles limited cases, mostly static shape/attributes. It is fine we just keep input as it is for static models. For more dynamic models, we need to do some extra work to reduce the dynamism during type inference. For example, there is a chance to reduce output shape of (?, ?, ?) to (1, ?, ?) in a dynamic op. This is necessary otherwise it's hard to ensure we are doing the right thing for backend. That error pointed out by @masahi is exactly the case. The input shape of ```get_valid_counts``` should be (1, ?, 5) while somehow recent change makes it (1, ?, ?). ```get_valid_counts``` doesn't allow dynamic box data length. This is an example why we need to make the output relay Expr as static as possible and ```_infer_value``` is necessary. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
