---
title: 控制可计算batch
description: "指定某几个batch参与attention计算。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0203.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0203.html
indexId: f776b2eb1f62718197ada9ce430f299946e91a9ed9b309874fb431dc9165986264
---
# 控制可计算batch

#### 功能说明

指定某几个batch参与attention计算。


#### 开启方式

参数“batchRunStatusEnable”置为true，并传入batchRunStatus作为输入tensor。

batchRunStatus为0，1组成的tensor。0代表该位置的batch不参与计算，1代表参与计算。


#### 约束说明

不支持 Atlas 推理系列产品 。
