---
title: auto_schedule
description: "auto_schedule接口的作用是把定义好的计算过程生成schedule对象。"
url: https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/others/tbeaicpudevg/atlaste_07_0067.html
sourcePath: /source/zh/CANNCommunityEdition/920beta1/others/tbeaicpudevg/atlaste_07_0067.html
indexId: 3dd6c1a63611d684402b02ec7104041d744e5c1dcc165c29eec3a0ac2387af0a81
---
# auto_schedule

#### 功能说明

auto_schedule接口的作用是把定义好的计算过程生成schedule对象。


#### 函数原型

auto_schedule(outs, option=None)


#### 参数说明

outs：算子输出tensor的列表，支持单个输出或者多输出的场景。

option：用于RL算子搜索的配置参数，正常auto_schedule无需配置。


#### 返回值:

schedule：算子的计算schedule。


#### 支持的型号

Atlas 训练系列产品

Atlas 推理系列产品

Atlas 200I/500 A2 推理产品

Atlas A2 训练系列产品 / Atlas A2 推理系列产品

Atlas A3 训练系列产品 / Atlas A3 推理系列产品


#### 调用示例

```
from tbe import tvm
from tbe import dsl
shape = (28,28)
dtype = "float16"
# 定义输入
data = tvm.placeholder(shape, name="data", dtype=dtype)
# 描述算子计算过程
res = dsl.vabs(data)
with tvm.target.cce():
# 生成schedule对象
sch = dsl.auto_schedule(res)
```
