Unverified Commit 892dc91a by Ethan-Yan27 Committed by GitHub

[Doc]refine the example description of max/min/sum/tag_scope (#4974)

parent 1c8e5b93
......@@ -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)
......@@ -950,6 +950,7 @@ def comm_reducer(fcombine, fidentity, name="reduce"):
# 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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment