Home
last modified time | relevance | path

Searched full:xnnpack (Results 1 – 25 of 6934) sorted by relevance

12345678910>>...278

/external/pytorch/third_party/
Dxnnpack_src_defs.bzl6 "XNNPACK/src/amalgam/gen/scalar.c",
10 "XNNPACK/src/amalgam/gen/avx512vnni.c",
14 "XNNPACK/src/amalgam/gen/avx512f.c",
18 "XNNPACK/src/f16-gemm/gen/f16-gemm-1x8-minmax-asm-aarch64-neonfp16arith-ld64.S",
19 "XNNPACK/src/f16-gemm/gen/f16-gemm-1x16-minmax-asm-aarch64-neonfp16arith-ld32.S",
20 "XNNPACK/src/f16-gemm/gen/f16-gemm-1x16-minmax-asm-aarch64-neonfp16arith-ld64.S",
21 "XNNPACK/src/f16-gemm/gen/f16-gemm-4x8-minmax-asm-aarch64-neonfp16arith-ld64.S",
22 "XNNPACK/src/f16-gemm/gen/f16-gemm-4x16-minmax-asm-aarch64-neonfp16arith-ld32.S",
23 "XNNPACK/src/f16-gemm/gen/f16-gemm-4x16-minmax-asm-aarch64-neonfp16arith-ld64.S",
24 "XNNPACK/src/f16-gemm/gen/f16-gemm-6x8-minmax-asm-aarch64-neonfp16arith-ld64.S",
[all …]
Dxnnpack.buck.bzl50 # This defines XNNPACK targets for both fbsource BUCK and OSS BUCK
52 # So for fbsource build it points to xplat/third-party/XNNPACK/XNNPACK,
53 # and for OSS it points to pytorch/third_party/XNNPACK
78 "xnnpack.h": "XNNPACK/include/xnnpack.h",
96 ("XNNPACK/src", "**/*.h"),
130 ("XNNPACK/src", "**/*.h"),
162 ("XNNPACK/src", "**/*.h"),
192 ("XNNPACK/src", "**/*.c"),
193 ("XNNPACK/src", "**/*.h"),
226 ("XNNPACK/src", "**/*.c"),
[all …]
/external/executorch/docs/source/
Dnative-delegates-executorch-xnnpack-delegate.md1 # ExecuTorch XNNPACK delegate
3XNNPACK backend delegate. This high performance delegate is aimed to reduce CPU inference latency …
5 ## What is XNNPACK?
6 XNNPACK is a library of highly-optimized neural network operators for ARM, x86, and WebAssembly arc…
9 … off execution to backends. The XNNPACK backend delegate is one of many available in ExecuTorch. I…
12 ![High Level XNNPACK delegate Architecture](./xnnpack-delegate-architecture.png)
15XNNPACK delegate happens at the `to_backend()` stage. In this stage, the model is partitioned by t…
17 ![ExecuTorch XNNPACK delegate Export Flow](./xnnpack-et-flow-diagram.png)
24 …g based on `source_fn_stack` allows us to identify groups of nodes which are lowerable via XNNPACK.
35 …averses the graph and identifies individual nodes which are lowerable to XNNPACK. A drawback to mo…
[all …]
Dtutorial-xnnpack-delegate-lowering.md1 # Building and Running ExecuTorch with XNNPACK Backend
3XNNPACK Delegate for accelerating your ML Models using CPU hardware. It will go over exporting and…
9 In this tutorial, you will learn how to export an XNNPACK lowered Model and run it on a target plat…
15 * [ExecuTorch XNNPACK Delegate](./native-delegates-executorch-xnnpack-delegate.md)
20 ## Lowering a model to XNNPACK
27 from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
42XNNPACK backend delegate to consume. Afterwards, the identified subgraphs will be serialized with …
65XNNPACK Delegate. The subgraphs which are being delegated to XNNPACK are the first argument at eac…
73 After lowering to the XNNPACK Program, we can then prepare it for executorch and save the model as …
76 ## Lowering a Quantized Model to XNNPACK
[all …]
/external/executorch/examples/xnnpack/
DREADME.md1 # XNNPACK Backend
3XNNPACK](https://github.com/google/XNNPACK) is a library of optimized neural network operators for…
4 - [XNNPACK Backend Delegate Overview](https://pytorch.org/executorch/stable/native-delegates-execut…
5 - [XNNPACK Delegate Export Tutorial](https://pytorch.org/executorch/stable/tutorial-xnnpack-delegat…
11 examples/xnnpack
14 …script to illustrate the full AOT (export, quantization, delegation) workflow with XNNPACK delegate
20XNNPACK delegated model `mv2_xnnpack_fp32.pte` that can be run using XNNPACK's operators. It will …
24 python3 -m examples.xnnpack.aot_compiler --model_name="mv2" --delegate
59 ./cmake-out/backends/xnnpack/xnn_executor_runner --model_path ./mv2_xnnpack_fp32.pte
65 Here we will discuss quantizing a model suitable for XNNPACK delegation using XNNPACKQuantizer.
[all …]
/external/executorch/backends/xnnpack/
DREADME.md1 # ExecuTorch XNNPACK Delegate
3 This subtree contains the XNNPACK Delegate implementation for ExecuTorch.
4 XNNPACK is an optimized library of neural network inference operators for ARM
6 mechanism for leveraging the XNNPACK library to accelerate operators running on
16 are suitable for lowering to XNNPACK delegate
18 for XNNPACK lowering
19 - `configs.py`: Contains lists of op/modules for XNNPACK lowering
21 graph for XNNPACK lowering
23 used to build the runtime graph and execute the XNNPACK model
24 - `serialization/`: Contains files related to serializing the XNNPACK graph
[all …]
Dxnnpack_preprocess.py13 from executorch.backends.xnnpack._passes import XNNPACKPassManager
14 from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
15 from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
18 from executorch.backends.xnnpack.operators.node_visitor import get_node_visitors
20 from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
24 from executorch.backends.xnnpack.serialization.xnnpack_graph_serialize import (
27 from executorch.backends.xnnpack.utils.configs import get_xnnpack_edge_compile_config
28 from executorch.backends.xnnpack.utils.utils import is_param_node
30 from executorch.backends.xnnpack.utils.xnnpack_constants import (
94 f"XNNPACK backend only supports contiguous memory format for inputs."
[all …]
/external/executorch/backends/xnnpack/_passes/
D__init__.py9 from executorch.backends.xnnpack._passes.channels_last_tagged_reshape_pass import (
12 from executorch.backends.xnnpack._passes.conv1d_unsqueeze_pass import (
15 from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
16 from executorch.backends.xnnpack._passes.convert_to_sdpa import ConvertToSDPAPass
17 from executorch.backends.xnnpack._passes.convert_to_upsample_bilinear2d import (
20 from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
21 from executorch.backends.xnnpack._passes.fuse_batch_norm_with_conv import (
24 from executorch.backends.xnnpack._passes.prelu_reshape_pass import PReLUReshapePass
25 from executorch.backends.xnnpack._passes.remove_getitem_op import RemoveGetItemPass
26 from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
[all …]
/external/executorch/shim/xplat/executorch/backends/xnnpack/third-party/
Dthird_party_libs.bzl7 "FP16": ["fbsource//xplat/third-party/FP16:FP16Fbcode", "//backends/xnnpack/third-party:FP16"],
8 "FXdiv": ["//xplat/third-party/FXdiv:FXdiv", "//backends/xnnpack/third-party:FXdiv"],
9 "XNNPACK": ["//xplat/third-party/XNNPACK:XNNPACK", "//backends/xnnpack/third-party:XNNPACK"],
10 "clog": ["//xplat/third-party/clog:clog", "//backends/xnnpack/third-party:clog"],
11 "cpuinfo": ["fbsource//third-party/cpuinfo:cpuinfo", "//backends/xnnpack/third-party:cpuinfo"],
12 …"pthreadpool": ["//xplat/third-party/pthreadpool:pthreadpool", "//backends/xnnpack/third-party:pth…
13 …der": ["//xplat/third-party/pthreadpool:pthreadpool_header", "//backends/xnnpack/third-party:pthre…
/external/executorch/backends/xnnpack/third-party/
Dxnnpack_src_defs.bzl2 "//backends/xnnpack/third-party/XNNPACK:build_srcs.bzl",
9 load("//backends/xnnpack/third-party/XNNPACK/gen:microkernels.bzl", "prod_srcs_for_arch")
13 return ["XNNPACK/{}".format(src) for src in xnnpack_build_src]
20 # XNNPACK Headers in the path containing xnnpack/ or configs/
21 # do not contain the src/ path. However headers not in xnnpack/ or
25 ("XNNPACK/src", "**/*.h"),
30 if not k.startswith("xnnpack") and not k.startswith("configs"):
34 ("XNNPACK/include", "*.h"),
/external/pytorch/aten/src/ATen/native/xnnpack/
DOpContext.cpp2 #include <ATen/native/xnnpack/Convolution.h>
3 #include <ATen/native/xnnpack/Linear.h>
4 #include <ATen/native/xnnpack/OpContext.h>
8 namespace at::native::xnnpack { namespace
22 xnnpack::internal::linear::create( in create_context()
26 : xnnpack::ContextLinear::kMin, in create_context()
28 : xnnpack::ContextLinear::kMax) in create_context()
44 return xnnpack::internal::linear::run(op_context_, input); in run()
57 xnnpack::internal::convolution2d::create( in create_context()
67 : xnnpack::ContextConv2D::kMin, in create_context()
[all …]
DLinear.cpp3 #include <ATen/native/xnnpack/Common.h>
5 #include <ATen/native/xnnpack/Linear.h>
7 namespace at::native::xnnpack { namespace
20 // XNNPACK in available()
21 return xnnpack::available() && in available()
79 "XNNPACK Linear not available! " in create()
81 "either invalid individually or their combination is not supported by XNNPACK."); in create()
127 "XNNPACK Linear not usable! " in run()
128 "Reason: The provided input tensor is either invalid or unsupported by XNNPACK."); in run()
174 c10::intrusive_ptr<xnnpack::LinearOpContext> createLinearClampPrePackOpContext( in createLinearClampPrePackOpContext()
[all …]
DRegisterOpContextClass.cpp4 #include <ATen/native/xnnpack/Convolution.h>
5 #include <ATen/native/xnnpack/Linear.h>
6 #include <ATen/native/xnnpack/OpContext.h>
9 namespace at::native::xnnpack { namespace
15 TORCH_LIBRARY(xnnpack, m) { in TORCH_LIBRARY() argument
78 …ar? output_min=None, Scalar? output_max=None) -> __torch__.torch.classes.xnnpack.LinearOpContext")… in TORCH_LIBRARY()
79 …VE_SCHEMA("prepacked::linear_clamp_run(Tensor X, __torch__.torch.classes.xnnpack.LinearOpContext W… in TORCH_LIBRARY()
80 …ar? output_min=None, Scalar? output_max=None) -> __torch__.torch.classes.xnnpack.Conv2dOpContext")… in TORCH_LIBRARY()
81 …ar? output_min=None, Scalar? output_max=None) -> __torch__.torch.classes.xnnpack.TransposeConv2dOp… in TORCH_LIBRARY()
82 …VE_SCHEMA("prepacked::conv2d_clamp_run(Tensor X, __torch__.torch.classes.xnnpack.Conv2dOpContext W… in TORCH_LIBRARY()
[all …]
DConvolution.h6 #include <ATen/native/xnnpack/Common.h>
7 #include <ATen/native/xnnpack/OpContext.h>
9 namespace at::native::xnnpack {
12 c10::intrusive_ptr<xnnpack::Conv2dOpContext>
23 c10::intrusive_ptr<xnnpack::TransposeConv2dOpContext>
37 const c10::intrusive_ptr<xnnpack::Conv2dOpContext>& op_context);
44 const c10::intrusive_ptr<xnnpack::TransposeConv2dOpContext>& op_context);
70 } // namespace at::native::xnnpack
DShim.cpp3 #include <ATen/native/xnnpack/Common.h>
4 #include <ATen/native/xnnpack/Engine.h>
9 // PyTorch is compiled without XNNPACK support. Under those scenarios, either
10 // all XNNPACK usage must be gated with #ifdefs at call-sites which would make
13 // XNNPACK related codepaths to be taken, and use of the actual operators
17 namespace at::native::xnnpack { namespace
22 "Not Implemented! Reason: PyTorch not built with XNNPACK support.";
92 } // namespace at::native::xnnpack
DInit.cpp3 #include <ATen/native/xnnpack/Common.h>
6 namespace at::native::xnnpack { namespace
22 TORCH_WARN_ONCE("Failed to initialize XNNPACK! Reason: Out of memory."); in initialize()
24 TORCH_WARN_ONCE("Failed to initialize XNNPACK! Reason: Unsupported hardware."); in initialize()
26 TORCH_WARN_ONCE("Failed to initialize XNNPACK! Reason: Unknown error!"); in initialize()
43 TORCH_WARN_ONCE("Failed to uninitialize XNNPACK! Reason: Unknown error!"); in deinitialize()
58 } // namespace at::native::xnnpack
/external/tensorflow/tensorflow/lite/tools/cmake/modules/
Dxnnpack.cmake16 if(TARGET xnnpack OR xnnpack_POPULATED)
23 xnnpack
24 GIT_REPOSITORY https://github.com/google/XNNPACK
29 SOURCE_DIR "${CMAKE_BINARY_DIR}/xnnpack"
31 OverridableFetchContent_GetProperties(xnnpack)
33 OverridableFetchContent_Populate(xnnpack)
38 set(XNNPACK_BUILD_TESTS OFF CACHE BOOL "Disable XNNPACK test.")
39 set(XNNPACK_BUILD_BENCHMARKS OFF CACHE BOOL "Disable XNNPACK benchmarks.")
41 # The following line adds project of PTHREADPOOL, FP16 and XNNPACK which are
42 # needed to compile XNNPACK delegate of TFLite.
/external/tensorflow/tensorflow/lite/delegates/xnnpack/
DREADME.md1 # XNNPACK backend for TensorFlow Lite
3 XNNPACK is a highly optimized library of neural network inference operators for
5 and Emscripten environments. This document describes how to use the XNNPACK
8 ## Using XNNPACK engine with TensorFlow Lite interpreter
10 XNNPACK integrates with TensorFlow Lite interpreter through the delegation
11 mechanism. TensorFlow Lite supports several methods to enable XNNPACK
14 ### Enable XNNPACK via Java API on Android (recommended on Android)
17 include XNNPACK, albeit it is disabled by default. Use the `setUseXNNPACK`
26 ### Enable XNNPACK via Swift/Objective-C API on iOS (recommended on iOS)
29 include XNNPACK, but do not enable it by default. Swift developers can use
[all …]
/external/executorch/examples/demo-apps/android/ExecuTorchDemo/
DREADME.md5 …entation tasks. Models are exported to ExecuTorch using [XNNPACK FP32 backend](tutorial-xnnpack-de…
37 #### XNNPACK Delegation
39 For delegating DeepLab v3 to XNNPACK backend, please do the following to export the model:
42 python3 -m examples.xnnpack.aot_compiler --model_name="dl3" --delegate
47 For more detailed tutorial of lowering to XNNPACK, please see [XNNPACK backend](tutorial-xnnpack-de…
64 #### XNNPACK subsubsection
66 1. Build the CMake target for the library with XNNPACK backend:
88 …npack_backend`](https://github.com/pytorch/executorch/blob/main/backends/xnnpack/CMakeLists.txt) w…
104 `libexecutorch_jni.so` wraps up the required XNNPACK Backend runtime library from `xnnpack_backend`…
108 1. Build the CMake target for the library with Qualcomm Hexagon NPU (HTP) backend (XNNPACK also inc…
[all …]
/external/executorch/examples/llm_manual/
Dexport_nanogpt.py9 # Load partitioner for Xnnpack backend
11 from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
14 from executorch.backends.xnnpack.utils.configs import get_xnnpack_edge_compile_config
36 # To be further lowered to Xnnpack backend, `traced_model` needs xnnpack-specific edge compile conf…
40 # Delegate exported model to Xnnpack backend by invoking `to_backend` function with Xnnpack partiti…
44 # Save the Xnnpack-delegated ExecuTorch program to a file.
/external/executorch/backends/xnnpack/test/
DCMakeLists.txt39 XNNPACK
46 PRIVATE ${EXECUTORCH_ROOT}/backends/xnnpack/third-party/XNNPACK/include
47 ${EXECUTORCH_ROOT}/backends/xnnpack/third-party/XNNPACK/src
48 ${EXECUTORCH_ROOT}/backends/xnnpack/third-party/cpuinfo/include
49 ${EXECUTORCH_ROOT}/backends/xnnpack/third-party/pthreadpool/include
/external/pytorch/torch/csrc/jit/backends/xnnpack/
Dxnnpack_graph_builder.h9 #include <xnnpack.h>
13 #include <torch/csrc/jit/backends/xnnpack/serialization/serializer.h>
17 namespace xnnpack {
31 // Set of all the tensor values mapped to the xnnpack ids
40 // xnnpack graph lowering.
47 // the tensor values beforehand for the xnnpack subgraph.
59 // Defines all xnnpack nodes for the nodes in the graph
71 TORCH_CHECK(xnn_status_success == status, "Failed to initialize xnnpack"); in XNNGraph()
95 } // namespace xnnpack
/external/executorch/backends/xnnpack/operators/
Dop_conv2d.py11 from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
12 from executorch.backends.xnnpack.operators.node_visitor import (
16 from executorch.backends.xnnpack.operators.quant_params import QuantParams
17 from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
23 from executorch.backends.xnnpack.utils.utils import check_or_raise, get_input_node
25 from executorch.backends.xnnpack.utils.xnnpack_constants import XNN_INVALID_VALUE_ID
56 # shape for xnnpack convolution is (oc, height, width, inc/groups), to convert
64 # XNNPACK expects the kernel's N and C dimensions to be swapped for
130 "XNNPACK does not support output padding",
134 len(stride) == 2, "XNNPACK currently only supports 2D convolution"
/external/pytorch/aten/src/ATen/test/
Dxnnpack_test.cpp6 #include <ATen/native/xnnpack/Common.h>
7 #include <ATen/native/xnnpack/Engine.h>
8 #include <ATen/native/xnnpack/OpContext.h>
9 #include <ATen/native/xnnpack/Pooling.h>
35 ASSERT_TRUE(at::native::xnnpack::use_hardswish(input)); in test_hardswish()
36 auto result = at::native::xnnpack::hardswish(input); in test_hardswish()
44 ASSERT_TRUE(at::native::xnnpack::use_hardswish(input)); in test_hardswish_()
45 at::native::xnnpack::hardswish_(input); in test_hardswish_()
53 ASSERT_TRUE(at::native::xnnpack::use_global_average_pool(input)); in test_global_average_pool()
54 auto result = at::native::xnnpack::global_average_pool(input); in test_global_average_pool()
[all …]
/external/executorch/backends/xnnpack/runtime/
DXNNExecutor.cpp9 #include <executorch/backends/xnnpack/runtime/XNNExecutor.h>
13 namespace xnnpack { namespace
59 * Prepares the args for XNNPACK Runtime.
66 * Note: the external ids given to the external tensors in the XNNPACK
103 "XNNPACK backend accepts tensors with at most %d dims, but got %zu", in prepare_args()
131 * Runs the XNNPACK Runtime.
140 "XNNPACK Delegate did not compile correctly"); in forward()
182 * the xnnpack runtime.
185 * XNNPACK gives the index tensor to us as int32, we need to convert it
197 // Fetch the updated output shapes from xnnpack runtime in resize_outputs()
[all …]

12345678910>>...278