Skip to main content

TfLiteAllocationType

Type Alias TfLiteAllocationType 

Source
pub type TfLiteAllocationType = c_uint;
Expand description

Memory allocation strategies.

  • kTfLiteMmapRo: Read-only memory-mapped data, or data externally allocated.
  • kTfLiteArenaRw: Arena allocated with no guarantees about persistence, and available during eval.
  • kTfLiteArenaRwPersistent: Arena allocated but persistent across eval, and only available during eval.
  • kTfLiteDynamic: Allocated during eval, or for string tensors.
  • kTfLitePersistentRo: Allocated and populated during prepare. This is useful for tensors that can be computed during prepare and treated as constant inputs for downstream ops (also in prepare).
  • kTfLiteCustom: Custom memory allocation provided by the user. See TfLiteCustomAllocation below.
  • kTfLiteVariantObject: Allocation is an arbitrary type-erased C++ object. Allocation and deallocation are done through new and delete.