From fbc9d5a083c61f781f751874a051b47103b7da3e Mon Sep 17 00:00:00 2001 From: Bin Li Date: Wed, 31 Aug 2022 19:53:43 -0700 Subject: [PATCH] modify doc comments --- python/tvm/relay/analysis/analysis.py | 6 +++--- src/relay/analysis/extract_intermediate_expr.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/tvm/relay/analysis/analysis.py b/python/tvm/relay/analysis/analysis.py index afc1d4a51f1c0..12f659f0037c7 100644 --- a/python/tvm/relay/analysis/analysis.py +++ b/python/tvm/relay/analysis/analysis.py @@ -434,10 +434,10 @@ def get_calibration_data(mod, data): def extract_intermdeiate_expr(mod, expr_id): - """Extract Relay Expr by the expression ID + """Extract Relay Expr by its expression ID This function is used for extracting Relay Expr - by the expression ID of the main function + by its expression ID of the main function that we can see in `print(mod["main"])`. Parameters @@ -454,7 +454,7 @@ def extract_intermdeiate_expr(mod, expr_id): -------- .. code-block:: python - # Supposed our module is printed like this: + # Suppose our module is printed like this: # def @main(%x: Tensor[(1, 1, 5, 1), float32], %w1, %w2) { # %0 = nn.conv2d(%x, %w1, padding=[1, 1, 1, 1], channels=1, kernel_size=[3, 3]); # %1 = nn.conv2d(%0, %w2, padding=[1, 1, 1, 1], channels=1, kernel_size=[3, 3]); diff --git a/src/relay/analysis/extract_intermediate_expr.cc b/src/relay/analysis/extract_intermediate_expr.cc index a24b2b536f97e..d7466e2729db3 100644 --- a/src/relay/analysis/extract_intermediate_expr.cc +++ b/src/relay/analysis/extract_intermediate_expr.cc @@ -39,7 +39,7 @@ class ExtractIntermediateExprWrapper : private MixedModeVisitor { IRModule Extract() { VisitExpr(this->mod_->Lookup("main")); - // ensure the target op num we want to dump is valid. + // ensure the target expr_id we want to extract is valid. ICHECK(target_expr_id_ >= 0 && target_expr_id_ < counter_); return IRModule::FromExpr(target_op_, {}); @@ -49,7 +49,7 @@ class ExtractIntermediateExprWrapper : private MixedModeVisitor { using MixedModeVisitor::VisitExpr_; const IRModule mod_; - /*! \brief the OP Number that we want to dump. */ + /*! \brief the expr id that we want to extract. */ const int target_expr_id_; int counter_; Expr target_op_;