You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/24 22:00:55 UTC

[GitHub] [tvm] vinx13 opened a new pull request, #11443: Canonicalize type annotation during construction of Var and SizeVar

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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tqchen merged pull request #11443: Canonicalize type annotation during construction of Var and SizeVar

Posted by GitBox <gi...@apache.org>.
tqchen merged PR #11443:
URL: https://github.com/apache/tvm/pull/11443


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao1994 commented on pull request #11443: Canonicalize type annotation during construction of Var and SizeVar

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11443:
URL: https://github.com/apache/tvm/pull/11443#issuecomment-1138120354

   Looks like unittests are failing because of this


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11443: Canonicalize type annotation during construction of Var and SizeVar

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11443:
URL: https://github.com/apache/tvm/pull/11443#discussion_r881122491


##########
tests/cpp/expr_test.cc:
##########
@@ -20,6 +20,7 @@
 #include <dmlc/logging.h>
 #include <gtest/gtest.h>
 #include <tvm/te/operation.h>
+#include "tvm/node/structural_equal.h"

Review Comment:
   nit:
   
   ```suggestion
   #include <tvm/node/structural_equal.h>
   ```



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org