Skip to content

Commit

Permalink
modify doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin Li committed Sep 1, 2022
1 parent 49aeb26 commit fbc9d5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions python/tvm/relay/analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions src/relay/analysis/extract_intermediate_expr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_, {});
Expand All @@ -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_;
Expand Down

0 comments on commit fbc9d5a

Please sign in to comment.