masahi commented on code in PR #12646:
URL: https://github.com/apache/tvm/pull/12646#discussion_r960150595
##########
python/tvm/relay/analysis/analysis.py:
##########
@@ -431,3 +431,23 @@ def get_calibration_data(mod, data):
calib_data[gvar] = value
return calib_data
+
+
+def extract_intermdeiate_expr(mod, expr_id):
+ """Extract Relay Expr by the local variable number
+
+ This function is used for extracting Relay Expr
+ by the local variable number of the main function
+ that we can see in `print(mod["main"])`.
+
+ Parameters
+ ----------
+ mod : tvm.IRModule
+
+ expr_id : the Expr Number that we want to extract
Review Comment:
Number -> ID
##########
python/tvm/relay/analysis/analysis.py:
##########
@@ -431,3 +431,23 @@ def get_calibration_data(mod, data):
calib_data[gvar] = value
return calib_data
+
+
+def extract_intermdeiate_expr(mod, expr_id):
+ """Extract Relay Expr by the local variable number
+
+ This function is used for extracting Relay Expr
+ by the local variable number of the main function
+ that we can see in `print(mod["main"])`.
Review Comment:
It would be nice to have an example here. `local variable number` is not a
word in TVM, we should just refer to them as expression ID or something.
--
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]