---
title: UnregisterKvCache
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/hixlug/llmcrv2_42_17.html
sourcePath: /source/zh/canncommercial/900/API/hixlug/llmcrv2_42_17.html
indexId: 10cd695f76b868db5d195af12ae998bb69ba442c8fe17b858b472c98a72bf0af59
---
# UnregisterKvCache

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | x |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


说明：针对 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 ，仅支持Atlas 800I A2 推理服务器、A200I A2 Box 异构组件。


#### 函数功能

解除注册本地KV Cache内存。


#### 函数原型

```
Status UnregisterKvCache(int64_t cache_id);
```


#### 参数说明

| 参数名称 | 输入/输出 | 取值说明 |
| --- | --- | --- |
| cache\_id | 输入 | 本地注册生成的cache ID。若指定的cache\_id不存在，则默认返回成功。 |


#### 调用示例

单击Gitee(https://gitee.com/ascend/samples/tags)，根据“标签名”下载配套版本的sample包，从“cplusplus/level1_single_api/11_llm_data_dist”目录中获取样例。


#### 返回值

- LLM_SUCCESS：成功
- 其他：失败


#### 约束说明

调用该接口前，需要先调用Initialize接口完成初始化。cache_id必须为RegisterKvCache接口返回的值。
