Commit 7cf1eadc by Alexander Pivovarov Committed by Wuwei Lin

Fix typo in travserse (#4469)

parent ba9d96bc
......@@ -575,7 +575,7 @@ def register_intrin_rule(target, intrin, f=None, override=False):
The name of codegen target.
intrin : str
The name of the instrinsic.
The name of the intrinsic.
f : function, optional
The function to be registered.
......
......@@ -18,7 +18,7 @@
*/
/*!
* Exposre of pass functions.
* Exposure of pass functions.
* \file api_pass.cc
*/
#include <tvm/expr.h>
......
......@@ -46,9 +46,9 @@ namespace ir {
// This requires us to do the following rewriting:
// - Rewrite allocation to use local memory.
// - Rewrite store of warp memory to local store.
// - Rewrite load of waro memory to local plus a shuffle.
// - Rewrite load of warp memory to local plus a shuffle.
//
// Define a generic shuffle instrinsic warp_shuffle(data, warp_index).
// Define a generic shuffle intrinsic warp_shuffle(data, warp_index).
// We can use the following rewriting rule
//
// Before rewrite,
......
......@@ -158,7 +158,7 @@ def schedule_bitserial_dense(cfg, outs):
return s
def traverse(op):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(op.tag) or 'elemwise' in op.tag:
if op not in s.outputs:
......
......@@ -104,7 +104,7 @@ def schedule_depthwise_conv2d_nchw(outs):
s[conv].compute_at(s[output], ji)
def traverse(op):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(op.tag):
if op not in s.outputs:
......
......@@ -105,7 +105,7 @@ def schedule_dense(cfg, outs):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -192,7 +192,7 @@ def schedule_depthwise_conv2d_nhwc(outs):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -68,7 +68,7 @@ def schedule_adaptive_pool(outs):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -131,7 +131,7 @@ def schedule_pool(outs, layout):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -109,7 +109,7 @@ def schedule_reduce(outs):
scheduled_ops = []
def traverse_before_reduce(operator):
"""Internal travserse function"""
"""Internal traverse function"""
if isinstance(operator, tvm.tensor.PlaceholderOp):
return
if tag.is_injective(operator.tag):
......@@ -123,7 +123,7 @@ def schedule_reduce(outs):
scheduled_ops.append(operator)
def traverse_after_reduce(operator):
"""Internal travserse function"""
"""Internal traverse function"""
if tag.is_broadcast(operator.tag):
if operator not in scheduled_ops:
schedule_injective_from_existing(sch, operator.output(0))
......
......@@ -28,7 +28,7 @@ def _schedule_conv2d(outs):
tvm.schedule.AutoInlineInjective(s)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_injective(OP.tag):
if OP not in s.outputs:
......@@ -214,7 +214,7 @@ def schedule_reduce(outs):
tvm.schedule.AutoInlineInjective(s)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -306,7 +306,7 @@ def schedule_dense(outs):
tvm.schedule.AutoInlineInjective(s)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -350,7 +350,7 @@ def schedule_pool(outs, layout):
tvm.schedule.AutoInlineInjective(s)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -394,7 +394,7 @@ def schedule_adaptive_pool(outs):
tvm.schedule.AutoInlineInjective(s)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -193,7 +193,7 @@ def schedule_depthwise_conv2d_nhwc(outs):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -49,7 +49,7 @@ def schedule_conv2d_nchw(outs):
s[data].opengl()
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -49,7 +49,7 @@ def schedule_dense(outs):
s[Out].opengl()
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -48,7 +48,7 @@ def schedule_adaptive_pool(outs):
s[Out].opengl()
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -102,7 +102,7 @@ def schedule_pool(outs, layout):
s[Out].opengl()
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -52,7 +52,7 @@ def schedule_binary_dense(outs):
s[Out].vectorize(xi)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -69,7 +69,7 @@ def schedule_bitserial_dense(cfg, outs):
return s
def traverse(op):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(op.tag) or 'elemwise' in op.tag:
if op not in s.outputs:
......
......@@ -88,7 +88,7 @@ def schedule_pool(outs, layout):
_parallel_sch(s[Pool], outs[0].shape, do_vectorize)
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......@@ -137,7 +137,7 @@ def schedule_adaptive_pool(outs):
scheduled_ops = []
def traverse(OP):
"""Internal travserse function"""
"""Internal traverse function"""
# inline all one-to-one-mapping operators except the last stage (output)
if tag.is_broadcast(OP.tag):
if OP not in s.outputs:
......
......@@ -78,7 +78,7 @@ def schedule_reduce(outs):
scheduled_ops = []
def traverse_before_reduce(operator):
"""Internal travserse function"""
"""Internal traverse function"""
if isinstance(operator, tvm.tensor.PlaceholderOp):
return
if tag.is_injective(operator.tag):
......@@ -92,7 +92,7 @@ def schedule_reduce(outs):
scheduled_ops.append(operator)
def traverse_after_reduce(operator):
"""Internal travserse function"""
"""Internal traverse function"""
if tag.is_broadcast(operator.tag):
if operator not in scheduled_ops:
generic.schedule_injective_from_existing(sch, operator)
......
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