更新时间:2021-03-18 GMT+08:00
分享

topi.generic.auto_schedule(outs)

生成dsl的schedule。该接口在cce.py中定义。

参数说明

outs:对算子的计算图描述,就是DSL。

返回值:

schedule:算子的计算schedule。

调用示例

import te.lang.cce 
from te 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)
分享:

    相关文档

    相关产品