Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/executorch
/ functions
Functions
28,493 in github.com/pytorch/executorch
⨍
Functions
28,493
◇
Types & classes
6,584
↳
Endpoints
346
↓ 33 callers
Function
save_pte_program
( prog: ExecutorchProgramManager, model_name: str, output_dir: str = "" )
extension/export_util/utils.py:129
↓ 33 callers
Function
to_edge_transform_and_lower_to_qnn
Transforms and lowers a given PyTorch module to the QNN backend. Args: module (Union[torch.nn.Module, torch.fx.GraphModule,Dict[str,
backends/qualcomm/utils/utils.py:326
↓ 32 callers
Method
append_operators
Append list of TFLite operators to created model via ModelBuilder. :param ops_to_add: List of operators to be added.
backends/nxp/backend/ir/converter/builder/aten_model_builder_director.py:84
↓ 32 callers
Method
assert_convertible
Assert that the call `is_supported()` returns `True`. Otherwise, raise an exception and print an error message.
backends/nxp/backend/ir/converter/node_converter.py:224
↓ 32 callers
Method
generate_method_name_compile_spec
Generate a CompileSpec for the given method name.
backends/aoti/aoti_backend.py:309
↓ 32 callers
Method
get_test_model
(self, generate_etrecord=False)
devtools/etrecord/tests/etrecord_test.py:110
↓ 32 callers
Method
has_stage
(self, stage_id: str)
backends/arm/test/tester/test_pipeline.py:271
↓ 32 callers
Method
min
(self)
backends/arm/tosa/mapping.py:69
↓ 31 callers
Method
_create_tflite_op_with_io_tensors
Create TFLite op wrapper with input/output tensors added into 'tmp_inputs' and 'tmp_outputs'. :param node: Node instance. :r
backends/nxp/backend/ir/converter/node_converter.py:262
↓ 31 callers
Method
_serialize_operator
Serialize a TOSA operator into the graph. When a ``DebugHook`` is active, attach location metadata (in JSON) to the operator for trac
backends/arm/operators/node_visitor.py:61
↓ 31 callers
Method
create_model
Create an instance of a model class that implements EagerModelBase and retrieve related data. Args: module_name (str): T
examples/models/model_factory.py:20
↓ 31 callers
Function
validate_num_inputs
Validate the number of inputs against expected values. This function checks whether the length of the input list matches the expected number(
backends/arm/operators/operator_validation_utils.py:18
↓ 30 callers
Function
_input_fn
Return a callable(shape, dtype) that generates a single-element input tuple. Args: uniform: Use torch.rand (uniform [0,1]) instead of tor
backends/mlx/test/test_ops.py:4093
↓ 30 callers
Method
_test
( self, m: torch.nn.Module, quant_config: Optional[QuantizationConfig] = None,
backends/xnnpack/test/ops/test_conv2d.py:211
↓ 30 callers
Method
add_stage
Adds a stage defined by a function with args and kwargs. By default appends to the pipeline. For stages which may be added multiple times to
backends/arm/test/tester/test_pipeline.py:167
↓ 29 callers
Function
_make_test_case
( module: torch.nn.Module, input_factory: input_factory_t, exir_ops: tuple[str, ...], u55_a16w
backends/arm/test/ops/test_matmul.py:46
↓ 29 callers
Method
add
Adds a value to the mapping for the given TOSA specification. The specification is normalized to its canonical form, which means that
backends/arm/tosa/specification.py:26
↓ 29 callers
Function
annotate_binary
(node: Node, quantization_config: QuantizationConfig)
backends/qualcomm/quantizer/rules.py:156
↓ 29 callers
Method
compile
(self, request: Request)
examples/qualcomm/oss_scripts/llama/wrappers/llm_wrappers.py:1091
↓ 29 callers
Method
exported_program
(self)
backends/apple/mps/operators/node_visitor.py:61
↓ 29 callers
Function
get_config_method_name
( prefix: Optional[str] = "forward", arg_type: str = "input", index: int = 0, key: str = "scal
exir/passes/quantize_io_pass.py:183
↓ 29 callers
Method
permute
(w, heads, partial_rotary_dim)
examples/qualcomm/oss_scripts/llama/wrappers/llm_wrappers.py:197
↓ 29 callers
Method
placeholder
( self, target: str, fake_tensor: Tensor, input_kind: InputKind = InputKind.US
backends/test/program_builder.py:69
↓ 29 callers
Method
test_dialect
Test the python dialect op implementation.
backends/cortex_m/test/tester.py:100
↓ 28 callers
Method
__init__
(self)
exir/backend/test/test_group_partitioner.py:1502
↓ 28 callers
Method
_emit_evalue
Writes an EValue to the emitter state. Given an Evalue, adds it to the emitter_state's values table, and returns the AbstractValue re
exir/emit/_emitter.py:614
↓ 28 callers
Function
_make_program_with_constant_tensor
Create a minimal program with one constant tensor using given weight bytes.
devtools/pte_tool/tests/test_diff_pte.py:34
↓ 28 callers
Function
_needs_truncation
(input_length, kernel_size, stride, padding)
backends/arm/test/passes/test_size_adjust_input_pass.py:60
↓ 28 callers
Function
_serialize_program
(program: Program)
devtools/pte_tool/tests/test_diff_pte.py:89
↓ 28 callers
Function
_to_edge_gm
Export module and lower to edge dialect, returning the GraphModule.
backends/mlx/test/test_passes.py:47
↓ 28 callers
Method
exported_program
(self)
backends/cortex_m/passes/cortex_m_pass.py:30
↓ 28 callers
Method
get_submodule
(node: torch.fx.Node)
exir/passes/__init__.py:330
↓ 28 callers
Function
is_dequant
(node: torch.fx.Node)
backends/xnnpack/utils/quant_utils.py:103
↓ 27 callers
Function
create_constant_placeholder
Creates and returns a constant placeholder node, meaning that it is of type parameter, buffer, or lifted constant tensor. graph.inserting_bef
backends/transforms/utils.py:98
↓ 27 callers
Function
find_node_by_target
Find first call_function node whose target contains target_name.
backends/mlx/test/test_pattern_utils.py:24
↓ 27 callers
Method
get_recipe
Get an export recipe from backend. Backend is automatically determined based on the passed recipe type. Args: re
export/recipe.py:177
↓ 27 callers
Method
nbytes
(self)
exir/tensor.py:189
↓ 26 callers
Function
_is_float_tensor
Check if the node's tensor is a float tensor, so that we can skip quantization for the node since observers only works with float Tensors
backends/samsung/quantizer/annotator.py:82
↓ 26 callers
Method
insert_delegate_mapping_entry
Add a new delegate mapping entry If self._generated_identifiers = False: - A new identifier must be provided, else an ex
exir/backend/utils.py:480
↓ 26 callers
Method
is_channels_last
(self)
backends/nxp/backend/data_format.py:38
↓ 26 callers
Function
load_file
Load a GGUF file and return the model arguments and weights.
extension/gguf_util/load_gguf.py:87
↓ 26 callers
Method
mul
(lhs: _ExactValues, rhs: _ExactValues)
backends/arm/_passes/symbolic_value_range.py:74
↓ 26 callers
Method
slot_to_vid
Convert a value Slot to a Vid, recording it for later remapping.
backends/mlx/builder/program_builder.py:294
↓ 26 callers
Function
topk_accuracy
(predictions, targets, k)
examples/qualcomm/utils.py:97
↓ 25 callers
Method
__init__
(self, n_heads: int, head_dim: int)
examples/models/voxtral_tts/model.py:306
↓ 25 callers
Function
_normalize_conv_param
Normalize a conv parameter (stride/padding/etc.) to a list of length ndim.
backends/mlx/ops.py:2561
↓ 25 callers
Function
get_conv1d_output_size
( in_size: torch.Size, out_channels: int, stride: int, padding: int, dilation: int, ke
backends/cadence/aot/utils.py:62
↓ 25 callers
Method
get_etrecord
Get the etrecord from the ExecuTorchProgramManager. Returns: The etrecord in the ExecuTorchProgramManager Raise
export/export.py:686
↓ 25 callers
Function
get_exported_graph
Export a module and return the graph with ATen ops.
backends/mlx/test/test_pattern_utils.py:18
↓ 25 callers
Method
get_named_data_store_output
(self)
exir/_serialize/_named_data_store.py:213
↓ 25 callers
Method
get_random_inputs
(self)
backends/apple/mps/test/test_mps_models.py:70
↓ 25 callers
Function
lower_run_compare
Run provided program twice with neutron-test and check if results correspond. At first, non-delegated program is executed (all nodes run on C
backends/nxp/tests/nsys_testing.py:377
↓ 25 callers
Method
meta_key
Return the FX ``meta`` key that stores special dtypes. Returns: str: Metadata key used to encode :class:`TosaSpecialDtype`.
backends/arm/tosa/mapping.py:51
↓ 25 callers
Function
quantize_model_
Quantize linear and embedding layers in a module in-place. .. warning:: This API is experimental and may change without notice. Arg
extension/llm/export/quantize.py:177
↓ 24 callers
Function
_input
(input_: torch.Tensor)
backends/arm/test/ops/test_elu.py:95
↓ 24 callers
Method
add_node_target
( self, targets, quant_dtype, is_qat, act_observer: UniformQuantizatio
backends/qualcomm/quantizer/quant_recipe.py:315
↓ 24 callers
Method
create_input
(self)
exir/backend/test/test_group_partitioner.py:105
↓ 24 callers
Method
create_model
(self, model)
exir/backend/test/test_group_partitioner.py:102
↓ 24 callers
Function
dequantize_weight
Dequantize a torchao quantized tensor back to a dense tensor.
examples/models/gemma4_31b/quant/quantize.py:249
↓ 24 callers
Method
dump
(self)
exir/program/_program.py:517
↓ 24 callers
Method
export_program
(self, model, x)
exir/backend/test/test_group_partitioner.py:108
↓ 24 callers
Function
gen_test_cases
Used when some inputs are not Tensor or scalar. Treat them as code text and generate. Each test case should be a tuple of (test_case_name
kernels/test/test_case_gen.py:306
↓ 24 callers
Function
get_context_spec
Get the current ``TosaSpecification`` from the lowering context. Returns: TosaSpecification: Active specification retrieved from the cont
backends/arm/tosa/specification.py:459
↓ 24 callers
Function
get_imagenet_dataset
( dataset_path, data_size, image_shape, crop_size=None, shuffle=True )
examples/qualcomm/utils.py:175
↓ 24 callers
Function
get_parameter
( node: torch.fx.Node, edge_program: torch.export.ExportedProgram )
backends/qualcomm/builders/utils.py:30
↓ 24 callers
Function
make_test_cases_dynamic_shape
A helper to make a list of tuples (test cases). Each tuple contains the name, inputs and output (expanded from *args), dynamic shape
kernels/test/test_case_gen.py:78
↓ 24 callers
Method
to_edge_transform_and_lower
( self, to_edge_and_lower_stage: Optional[BaseStages.ToEdgeTransformAndLower] = None,
backends/arm/test/tester/arm_tester.py:446
↓ 24 callers
Method
to_executorch
( self, to_executorch_stage: Optional[BaseStages.ToExecutorch] = None )
backends/arm/test/tester/arm_tester.py:489
↓ 24 callers
Method
validate
Check if the given input type combination a legal one of current function. Args: types: A dict of arg name to its current dtype.
exir/dialects/edge/_ops.py:103
↓ 24 callers
Function
validate_same_dtype
Validate that all given tensors have the same dtype. This function checks whether all items in the ``tensors`` list have the same ``dtype`` a
backends/arm/operators/operator_validation_utils.py:54
↓ 23 callers
Function
EXIREdgeDialectVerifier
( # noqa: C901 edge_compile_config: Optional[EdgeCompileConfig] = None, class_only: bool = False,
exir/verification/verifier.py:242
↓ 23 callers
Method
__init__
(self, n_heads: int, head_dim: int)
examples/models/voxtral_realtime/model.py:370
↓ 23 callers
Function
_find_nodes
Return all ``call_function`` nodes whose target string contains ``contains``. If ``excludes`` is given, also drop any node whose target string
exir/tests/test_reinplace_pass.py:24
↓ 23 callers
Method
create_tensor_for_data
(self, data: np.ndarray, name: str)
backends/nxp/backend/ir/converter/builder/model_builder.py:607
↓ 23 callers
Method
get_attr
Inserts a ``get_attr`` node into the Graph.
exir/graph.py:51
↓ 23 callers
Method
get_config
Return the ``QuantConfig`` for a weight FQN, or ``None`` to skip.
examples/models/gemma4_31b/quant/recipe.py:48
↓ 23 callers
Function
get_control_flow_submodules
Returns a list of submodules used for control flow operations (torch.ops.higher_order.cond/map/scan) that are in the given toplevel graph (do
exir/graph_module.py:76
↓ 23 callers
Method
get_random_inputs
(self)
exir/tests/models.py:156
↓ 23 callers
Function
is_quant
(node: torch.fx.Node)
backends/xnnpack/utils/quant_utils.py:95
↓ 23 callers
Method
run
Traverses all nodes in the graph module and emits each one appropriately.
exir/emit/_emitter.py:1823
↓ 23 callers
Method
t
(self, val)
exir/tests/test_passes.py:1757
↓ 23 callers
Method
test_implementation
Test the optimized op implementation in simulation
backends/cortex_m/test/tester.py:128
↓ 23 callers
Method
to_edge
( self, config: Optional[EdgeCompileConfig] = None )
exir/program/_program.py:507
↓ 23 callers
Function
validate_numerics
Validate that two graph modules produce numerically equivalent outputs.
backends/transforms/test/test_permute_optimization_passes.py:42
↓ 23 callers
Method
write_tensor_data_to_file
Writes the serialized ExecuTorch data files to the directory at `outdir`.
exir/program/_program.py:702
↓ 22 callers
Method
__init__
(self)
backends/arm/test/misc/test_transpose_counts.py:138
↓ 22 callers
Function
construct_transformer
Construct a Transformer model from the given model arguments.
examples/models/llama/llama_transformer.py:404
↓ 22 callers
Method
convert_tokens_to_ids
Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the vocabulary. Args: toke
examples/mediatek/aot_utils/llm_utils/tokenizers_/tokenization_utils.py:623
↓ 22 callers
Method
create_workspace
(self, tree: Dict[Any, Any])
tools/cmake/common/__init__.py:80
↓ 22 callers
Method
from_tensor
(cls, tensor: torch.Tensor, const: bool = False)
exir/tensor.py:193
↓ 22 callers
Method
get_sub_graph
(self)
backends/nxp/backend/ir/converter/builder/model_builder.py:1681
↓ 22 callers
Method
is_empty
(self)
backends/vulkan/utils.py:98
↓ 22 callers
Method
is_fusable_conv_or_linear__aten
Node operator is supported fusable Linear or Conv2D on Neutron.
backends/nxp/backend/neutron_target_spec.py:71
↓ 22 callers
Method
memory_format_test_runner
( test_class: unittest.TestCase, test_set: MemoryFormatTestSet, check_unambiguous_dim_
exir/tests/test_memory_format_ops_pass_utils.py:192
↓ 22 callers
Method
run_cmake
( self, cmake_args: Optional[List[str]] = None, error_contains: Optional[str] = None,
tools/cmake/common/__init__.py:105
↓ 22 callers
Method
to_executorch
Lower the model to executorch and get an ExecutorchProgram.
extension/llm/export/builder.py:477
↓ 21 callers
Method
Shape
(self, j)
backends/nxp/backend/ir/lib/tflite/Tensor.py:37
↓ 21 callers
Method
__init__
(self)
exir/backend/test/test_backends_lifted.py:855
↓ 21 callers
Method
__init__
(self, n_layer: int = 1, output_size: int = 1)
exir/tests/models.py:72
↓ 21 callers
Method
add_regex
Add a quantization strategy targeting nodes whose module stack matches given regex patterns. Args: regex (Iterable[str])
backends/qualcomm/quantizer/quant_recipe.py:342
← previous
next →
201–300 of 28,493, ranked by callers