Skip to content

Commit 897eb64

Browse files
committed
x
1 parent 91d25c1 commit 897eb64

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

python/tvm/autotvm/task/task.py

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -342,74 +342,6 @@ def args_to_workload(x, task_name=None):
342342
'primitive types or tvm.expr.Var only' % type(x))
343343
return tuple((task_name, ) + workload) if task_name else workload
344344

345-
# def template(func):
346-
# """
347-
# Decorate a function as a tunable schedule template
348-
#
349-
# Parameters
350-
# ----------
351-
# func: callable
352-
# A callable template function.
353-
# Its argument should be hashable values.
354-
# Its return value should be a Tuple(Schedule, Array of Tensor)
355-
#
356-
# Returns
357-
# -------
358-
# func: callable
359-
# The decorated function
360-
#
361-
# Examples
362-
# --------
363-
# The following code is a tunable template for a blocked matrix multiplication
364-
#
365-
# .. code-block:: python
366-
#
367-
# @autotvm.template
368-
# def matmul(N, L, M, dtype):
369-
# A = tvm.placeholder((N, L), name='A', dtype=dtype)
370-
# B = tvm.placeholder((L, M), name='B', dtype=dtype)
371-
#
372-
# k = tvm.reduce_axis((0, L), name='k')
373-
# C = tvm.compute((N, M), lambda i, j: tvm.sum(A[i, k] * B[k, j], axis=k), name='C')
374-
# s = tvm.create_schedule(C.op)
375-
#
376-
# # schedule
377-
# y, x = s[C].op.axis
378-
# k = s[C].op.reduce_axis[0]
379-
#
380-
# ##### define space begin #####
381-
# cfg = autotvm.get_config()
382-
# cfg.define_split("tile_y", y, num_outputs=2)
383-
# cfg.define_split("tile_x", x, num_outputs=2)
384-
# ##### define space end #####
385-
#
386-
# # schedule according to config
387-
# yo, yi = cfg["tile_y"].apply(s, C, y)
388-
# xo, xi = cfg["tile_x"].apply(s, C, x)
389-
#
390-
# s[C].reorder(yo, xo, k, yi, xi)
391-
#
392-
# return s, [A, B, C]
393-
# """
394-
# # pylint: disable=unused-variable
395-
#
396-
# fname = get_func_name(func)
397-
#
398-
# @register(fname)
399-
# @dispatcher
400-
# def config_dispatcher(*args, **kwargs):
401-
# assert not kwargs, "Do not support kwargs in template function call"
402-
# return (fname, ) + args_to_workload(args)
403-
#
404-
# @config_dispatcher.register("")
405-
# def template_call(cfg, *args, **kwargs):
406-
# assert not kwargs, "Do not support kwargs in template function call"
407-
# with ApplyConfig(cfg):
408-
# return func(*args, **kwargs)
409-
#
410-
# config_dispatcher.func_name = fname
411-
# return config_dispatcher
412-
413345
def get_config():
414346
"""Get current config object
415347

0 commit comments

Comments
 (0)