Skip to content

Commit

Permalink
Added invalidate handle marco
Browse files Browse the repository at this point in the history
Type: Code Improvement
Signed-off-by: Feiyue Chen <[email protected]>
  • Loading branch information
chenfeiyue-cfy committed Dec 1, 2022
1 parent c231c54 commit 7c331a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tim/vx/tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c331a9

Please sign in to comment.