vinx13 opened a new pull request, #11443: URL: https://github.com/apache/tvm/pull/11443
var->type_annotation may be empty when only `runtime::DataType` is passed to the constructor. This PR added canonicalization during the construction of `Var` and `SizeVar`, so that `Var(dtype="float32", type_annotation=PrimType(Float(32)))` is equivalent to `Var(dtype="float32", type_annotation=None)`. The printer side for `Var` and `SizeVar` is not affected and doesn't need update. `ReprPrinter` always omit type information: https://github.com/apache/tvm/blob/main/src/tir/ir/expr.cc#L120 `TextPrinter` has already been implicitly converting from `runtime::DataType` to `Type`: https://github.com/apache/tvm/blob/main/src/printer/tir_text_printer.cc#L782 cc @tqchen -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
