Skip to content

Commit

Permalink
[Doc]refine the example description of max/min/sum/tag_scope (#4974)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Yan27 authored Mar 2, 2020
1 parent 1c8e5b9 commit 892dc91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/te/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ def tag_scope(tag):
# or use tag_scope as decorator
@tvm.te.tag_scope(tag="conv")
def compute_relu(data):
return te.compute(data.shape, lambda *i: tvm.select(data(*i) < 0, 0.0, data(*i)))
return te.compute(data.shape, lambda *i: tvm.tir.Select(data(*i) < 0, 0.0, data(*i)))
"""
return TagScope(tag)
1 change: 1 addition & 0 deletions python/tvm/tir/op.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ def reducer(expr, axis, where=None, *args):
# there are two way to use this {0} reducer:
# mode 1, accept (expr, axis, where) to produce an Reduce Expr
# tvm.{0} represents tvm.te.{0} or tvm.tir.{0}.
B = te.compute((m,), lambda i: tvm.{0}(A[i, k], axis=k), name="B")
# mode 2, simply use it with multiple Exprs:
Expand Down

0 comments on commit 892dc91

Please sign in to comment.