tfe_tensor_f64_to_dlpack

Function tfe_tensor_f64_to_dlpack 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tfe_tensor_f64_to_dlpack( tensor: *mut TfeTensorF64, status: *mut tfe_status_t, ) -> *mut DLManagedTensorVersioned
Expand description

Export a tensor as a DLPack managed tensor (zero-copy).

The tensor handle is consumed by this call and must not be used afterwards.

§Safety

  • tensor must be a valid tensor pointer or NULL.
  • status must be a valid, non-null pointer.

§Examples (C)

tfe_status_t status;
DLManagedTensorVersioned *dl = tfe_tensor_f64_to_dlpack(t, &status);