---
title: IsRecompute接口
description: "判断请求是否是重计算请求。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0076.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0076.html
indexId: d1e9a9ba32b4552d5ecce0af8c8cee851d4c5f79b61359185fcb55a762c1046258
---
# IsRecompute接口

#### 接口功能

判断请求是否是重计算请求。


#### 接口格式

```
bool IsRecompute() const;
```


#### 接口参数

无。


#### 使用样例

构造一个请求对象后，为该请求对象设置重计算类型，然后获取该请求是否为重计算请求。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
runtimeRequest->SetRecompute(true);
bool isRecompute = runtimeRequest->IsRecompute();
```


#### 返回值

bool类型。
