---
title: 函数：host_unregister
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_1067.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_1067.html
indexId: 3672282cdb20baede40da0d1b727a8ec74558d2eb7f84fa1c277e7186e6dd69771
---
# 函数：host_unregister

#### 产品支持情况

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


#### 功能说明

取消注册Host内存。本接口与acl.rt.host_register接口成对使用。


#### 函数原型

- C函数原型
  1 aclError aclrtHostUnregister(void *ptr)

- python函数
  1 ret = acl.rt.host_unregister(ptr)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| ptr | int，Host侧内存地址。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |
