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

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| 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 异构组件。


#### 函数功能

解除注册一个自行申请的内存。


#### 函数原型

```
unregister_cache(cache_id: int) -> None
```


#### 参数说明

| 参数名称 | 数据类型 | 取值说明 |
| --- | --- | --- |
| cache\_id | int | 调用register\_cache或register\_blocks\_cache返回的cache的id。 |


#### 调用示例

请单击Gitcode(https://gitcode.com/cann/hixl)，选择配套版本，从“examples/python”目录中获取样例。


#### 返回值

正常情况下无返回值。

传入数据类型错误情况下会抛出TypeError或ValueError异常。


#### 约束说明

- 当前仅支持配置  local_comm_res
场景使用。
- 调用该接口之前，需要先调用  unlink
进行断链，否则会导致HCCL报错。
