wweic commented on a change in pull request #5881:
URL: https://github.com/apache/incubator-tvm/pull/5881#discussion_r475262844
##########
File path: python/tvm/ir/module.py
##########
@@ -87,6 +87,10 @@ def _add(self, var, val, update=False):
var = _ty.GlobalTypeVar(var)
_ffi_api.Module_AddDef(self, var, val, update)
+ def add_unchecked(self, var, val):
Review comment:
add a doc string
##########
File path: src/relay/analysis/type_solver.h
##########
@@ -65,6 +65,9 @@ class TypeSolver {
public:
TypeSolver(const GlobalVar& current_func, const IRModule& _mod,
ErrorReporter* err_reporter);
~TypeSolver();
+
+ void SetCurrentFunc(GlobalVar current_func) { this->current_func =
current_func; }
Review comment:
add a comment
##########
File path: python/tvm/relay/transform/transform.py
##########
@@ -98,6 +98,8 @@ def InferType():
"""
return _ffi_api.InferType()
+def InferTypeAll():
Review comment:
Add a doc string
##########
File path: src/relay/transforms/type_infer.cc
##########
@@ -109,6 +134,44 @@ class TypeInferencer : private ExprFunctor<Type(const
Expr&)>,
// inference the type of expr.
Expr Infer(Expr expr);
+ void SetCurrentFunc(GlobalVar current_func) {
+ this->current_func_ = current_func;
+ this->solver_.SetCurrentFunc(current_func);
+ }
+
+ void Solve();
+ Expr ResolveType(Expr expr);
Review comment:
add a comment.
----------------------------------------------------------------
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]