函数:allocator_unregister
产品支持情况
|
产品 |
是否支持 |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
x |
功能说明
取消注册用户提供的Allocator以及Allocator对应的回调函数,用于取消使用用户提供的Allocator。
函数原型
- C函数原型
1aclError aclrtAllocatorUnregister(aclrtStream stream)
- python函数
1ret = acl.rt.allocator_unregister(stream)
参数说明
|
参数名 |
说明 |
|---|---|
|
stream |
int,该Allocator对应的stream。 |
返回值说明
|
返回值 |
说明 |
|---|---|
|
ret |
int,错误码,返回0表示成功,返回其它值表示失败。 |
约束说明
Atlas 200/300/500 推理产品 ,不支持该接口。- Atlas 200I/500 A2推理产品,不支持该接口。
- 用户销毁Allocator前,调用本接口取消注册。
- 待取消注册的Stream不存在,或多次调用本接口取消注册,本接口内部不做任何操作,返回成功。
父主题: 内存管理