RegisterExternalAllocator
产品支持情况
|
产品 |
是否支持 |
|---|---|
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
√ |
头文件/库文件
- 头文件:/include/ge/ge_api_v2.h
- 库文件:libge_runner_v2.so
功能说明
用户将自己的Allocator注册给GE,适用于使用用户的内存池场景。
此接口需要配合LoadGraph、RunGraphWithStreamAsync接口使用,并且需要在LoadGraph接口调用前注册。
函数原型
1
|
Status RegisterExternalAllocator(const void *const stream, AllocatorPtr allocator) const |
参数说明
返回值说明
|
参数名 |
类型 |
说明 |
|---|---|---|
|
- |
Status |
SUCCESS:设置成功。 FAILED:设置失败。 |
父主题: GESession API