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/09/01 01:47:52 UTC

[GitHub] [tvm] masahi commented on a diff in pull request #12646: [Analysis] Add dump op by relay var number for analysis

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

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