AddTensorRefPtr
函数功能
提供异步回调功能。
需在调用CreateAscendStream之后使用。
将输入Tensor挂载到AscendStream对象上,延长输入Tensor的生命周期。当调用Synchronize或者DestroyAscendStream时,AscendStream对象会释放被挂载的Tensor。
函数原型
void AddTensorRefPtr(const Tensor& inputTensor);
参数说明
参数名 |
输入/输出 |
说明 |
---|---|---|
inputTensor |
输入 |
Tensor类,需要挂载到AscendStream对象上的张量。 |
父主题: AscendStream