此接口后续版本会废弃,请使用te.lang.cce.auto_schedule接口。
auto_schedule接口的作用是把定义好的计算过程生成schedule对象。
您可以在“topi/generic/cce.py”查看接口定义。
topi.generic.auto_schedule(outs, option=None)
outs:算子输出tensor的列表,支持单个输出或者多输出的场景。
option:用于RL算子搜索的配置参数,正常auto_schedule无需配置。
schedule:算子的计算schedule。
Atlas 200/300/500 推理产品
Atlas 训练系列产品
import te.lang.cce import tvm import topi.generic shape = (28,28) dtype = "float16" # 定义输入 data = tvm.placeholder(shape, name="data", dtype=dtype) # 描述算子计算过程 res = te.lang.cce.vabs(data) with tvm.target.cce(): # 生成schedule对象 sch = topi.generic.auto_schedule(res)