Added invalidate handle marco
Type: Code Improvement Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
This commit is contained in:
parent
f7b49ae4e2
commit
b7478f7872
|
|
@ -172,6 +172,9 @@ bool TensorImpl::CopyDataFromTensor(void* data) {
|
|||
if (tensor->attr.is_created_from_handle) {
|
||||
void* ptr = NULL;
|
||||
vsi_nn_GetTensorHandle(tensor, &ptr);
|
||||
#ifdef VSI_INVALIDATE_HANDLE_SUPPORT
|
||||
vsi_nn_InvalidateHandle(tensor);
|
||||
#endif
|
||||
if (ptr) {
|
||||
memcpy(data, ptr, tensor_bytes);
|
||||
retn = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue