Skip to content

Commit

Permalink
Make spelling of "axes" consistent (#7460)
Browse files Browse the repository at this point in the history
  • Loading branch information
gussmith23 authored Feb 16, 2021
1 parent fc48514 commit 413692e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/tvm/relay/attrs/transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct ExpandDimsAttrs : public tvm::AttrsNode<ExpandDimsAttrs> {
"If `axis < 0`, it is the first axis inserted;"
"If `axis >= 0`, it is the last axis inserted in Python's negative indexing.");
TVM_ATTR_FIELD(num_newaxis)
.describe("Number of axises to be inserted. Should be >= 0.")
.describe("Number of axes to be inserted. Should be >= 0.")
.set_lower_bound(0)
.set_default(1);
}
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relay/op/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def reinterpret(data, dtype):


def expand_dims(data, axis, num_newaxis=1):
"""Insert `num_newaxis` axises at the position given by `axis`.
"""Insert `num_newaxis` axes at the position given by `axis`.
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion src/relay/op/tensor/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Expr MakeExpandDims(Expr data, int axis, int num_newaxis) {
TVM_REGISTER_GLOBAL("relay.op._make.expand_dims").set_body_typed(MakeExpandDims);

RELAY_REGISTER_OP("expand_dims")
.describe(R"code(Insert `num_newaxis` axises at the position given by `axis`
.describe(R"code(Insert `num_newaxis` axes at the position given by `axis`
- **data**: The input data to the operator.
Expand Down
14 changes: 7 additions & 7 deletions tutorials/language/schedule_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
######################################################################
# split
# -----
# :code:`split` can split a specified axis into two axises by
# :code:`split` can split a specified axis into two axes by
# :code:`factor`.
A = te.placeholder((m,), name="A")
B = te.compute((m,), lambda i: A[i] * 2, name="B")
Expand All @@ -92,7 +92,7 @@
# tile
# ----
# :code:`tile` help you execute the computation tile by tile over two
# axises.
# axes.
A = te.placeholder((m, n), name="A")
B = te.compute((m, n), lambda i, j: A[i, j], name="B")

Expand All @@ -103,12 +103,12 @@
######################################################################
# fuse
# ----
# :code:`fuse` can fuse two consecutive axises of one computation.
# :code:`fuse` can fuse two consecutive axes of one computation.
A = te.placeholder((m, n), name="A")
B = te.compute((m, n), lambda i, j: A[i, j], name="B")

s = te.create_schedule(B.op)
# tile to four axises first: (i.outer, j.outer, i.inner, j.inner)
# tile to four axes first: (i.outer, j.outer, i.inner, j.inner)
xo, yo, xi, yi = s[B].tile(B.op.axis[0], B.op.axis[1], x_factor=10, y_factor=5)
# then fuse (i.inner, j.inner) into one axis: (i.inner.j.inner.fused)
fused = s[B].fuse(xi, yi)
Expand All @@ -117,14 +117,14 @@
######################################################################
# reorder
# -------
# :code:`reorder` can reorder the axises in the specified order.
# :code:`reorder` can reorder the axes in the specified order.
A = te.placeholder((m, n), name="A")
B = te.compute((m, n), lambda i, j: A[i, j], name="B")

s = te.create_schedule(B.op)
# tile to four axises first: (i.outer, j.outer, i.inner, j.inner)
# tile to four axes first: (i.outer, j.outer, i.inner, j.inner)
xo, yo, xi, yi = s[B].tile(B.op.axis[0], B.op.axis[1], x_factor=10, y_factor=5)
# then reorder the axises: (i.inner, j.outer, i.outer, j.inner)
# then reorder the axes: (i.inner, j.outer, i.outer, j.inner)
s[B].reorder(xi, yo, xo, yi)
print(tvm.lower(s, [A, B], simple_mode=True))

Expand Down

0 comments on commit 413692e

Please sign in to comment.