Module runtime

Source

Modules§

etensor

Structs§

DataLoader
Loads from a data source.
DataLoader_SegmentInfo
Describes the content of the segment.
EValue
EventTracer
EventTracer is a class that users can inherit and implement to log/serialize/stream etc. the profiling and debugging events that are generated at runtime for a model. An example of this is the ETDump implementation in the devtools codebase that serializes these events to a flatbuffer.
HierarchicalAllocator
A group of buffers that can be used to represent a device’s memory hierarchy.
MemoryAllocator
A class that does simple allocation based on a size and returns the pointer to the memory address. It bookmarks a buffer with certain size. The allocation is simply checking space and growing the cur_ pointer with each allocation request.
MemoryManager
A container class for allocators used during Method load and execution.
Method
An executable method of an executorch program. Maps to a python method like forward() on the original nn.Module.
MethodMeta
Describes a a method in an ExecuTorch program.
Program
A deserialized ExecuTorch program binary.
TensorInfo
Metadata about a specific tensor of an ExecuTorch Program.

Enums§

DataLoader_SegmentInfo_Type
Represents the purpose of the segment.
Error
ExecuTorch Error type.
Program_HeaderStatus
Describes the presence of an ExecuTorch program header.
Program_Verification
Types of validation that the Program can do before parsing the data.
Tag
The dynamic type of an EValue.
TensorShapeDynamism
The resizing capabilities of a Tensor.

Constants§

HierarchicalAllocator_kSpanArraySize
MemoryAllocator_kDefaultAlignment
Default alignment of memory returned by this class. Ensures that pointer fields of structs will be aligned. Larger types like long double may not be, however, depending on the toolchain and architecture.

Functions§

MethodMeta_name
Get the name of this method.
MethodMeta_num_inputs
Get the number of inputs to this method.
MethodMeta_num_memory_planned_buffers
Get the number of memory-planned buffers this method requires.
MethodMeta_num_outputs
Get the number of outputs to this method.
Method_Method_destructor
Method_execute
Execute the method.
Method_experimental_reset_execution
DEPRECATED: Use reset_execution() instead.
Method_experimental_step
DEPRECATED: Use step() instead.
Method_get_event_tracer
Method_get_input
DEPRECATED: Use MethodMeta instead to access metadata, and set_input to update Method inputs.
Method_get_inputs
Copies the method’s inputs into the provided array.
Method_get_output
Retrieves the output at the specified index.
Method_get_outputs
Copies the method’s outputs into the provided array.
Method_inputs_size
Returns the number of inputs the Method expects.
Method_method_meta
Returns the MethodMeta that corresponds to the calling Method.
Method_mutable_input
DEPRECATED: Use MethodMeta instead to access metadata, and set_input to update Method inputs.
Method_mutable_output
DEPRECATED: Use MethodMeta instead to access metadata, and get_output to retrieve Method outputs.
Method_outputs_size
Returns the number of outputs the Method returns.
Method_reset_execution
EXPERIMENTAL: Resets execution state to the start of the Method. For use with the step() API.
Method_set_input
Sets the internal input value to be equivalent to the to the provided value.
Method_set_output_data_ptr
Sets the data buffer of the specified method output to the provided value.
Method_step
EXPERIMENTAL: Advances/executes a single instruction in the method.
Program_check_header
Looks for an ExecuTorch program header in the provided data.
Program_num_methods
Returns the number of methods in the program.
TensorInfo_is_memory_planned
Returns whether the tensor’s memory was planned during export.
TensorInfo_nbytes
Returns the size of the tensor in bytes.
TensorInfo_scalar_type
Returns the scalar type of the input/output.

Type Aliases§

FreeableBuffer_FreeFn
Span_size_type
error_code_t

Unions§

EValue_Payload
EValue_Payload_TriviallyCopyablePayload