Title: Integrating a Backend Delegate into ExecuTorch — ExecuTorch main documentation
Generator: Docutils 0.18.1: http://docutils.sourceforge.net/
Domain: docs.pytorch.org
{
"@context": "https://schema.org",
"@type": "Article",
"name": "Integrating a Backend Delegate into ExecuTorch",
"headline": "Integrating a Backend Delegate into ExecuTorch",
"description": "PyTorch Documentation. Explore PyTorch, an open-source machine learning library that accelerates the path from research prototyping to production deployment. Discover tutorials, API references, and guides to help you build and deploy deep learning models efficiently.",
"url": "/backend-delegates-integration.html",
"articleBody": "Integrating a Backend Delegate into ExecuTorch# Disclaimer: We are planning to restructure the repository around delegates. With that some of these guidelines will change in the future. This is a high level guideline when integrating a backend delegate with ExecuTorch. Directory Structure# Delegate files should be under this directory: executorch/backends/\u003cdelegate_name\u003e/. The delegate name should be unique. Python Source Files# Delegate Python files such as those implementing preprocess() or partition() functions for ExecuTorch AOT flow, excluding any external third-party dependencies and their files, should be installed and available with the top level ExecuTorch package. For third-party dependencies, please refer to this. C++ Source Files# At a minimum, a delegate must provide CMake support for building its C++ sources. For the CMake setup: The delegate directory should be included by the top-level CMakeLists.txt file using the add_subdirectory command. It should be built conditionally using an ExecuTorch build flag like EXECUTORCH_BUILD_\u003cDELEGATE_NAME\u003e. (See EXECUTORCH_BUILD_XNNPACK for an example.) For third-party dependencies, please refer to this. Tests# Tests should be added under executorch/backends/\u003cdelegate_name\u003e/test. Tests can be either python or C++ tests. For adding more complex end-to-end (e2e) tests, please reach out to us. Common test types: Simple python unit tests that test AOT logic such as partitioner() or AOT export flow (generating a .pte file from an nn.Module) Runtime C++ tests, using gtest, that test delegate init() or execute() runtime logic. Documentation# A delegate must include: executorch/backends/\u003cdelegate_name\u003e/README.md \u2013 covering the basics of the delegate, its directory structure, features, and any known issues. executorch/backends/\u003cdelegate_name\u003e/setup.md \u2013 documenting any additional setup steps beyond the ones listed above.",
"author": {
"@type": "Organization",
"name": "PyTorch Contributors",
"url": "https://pytorch.org"
},
"image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "/backend-delegates-integration.html"
},
"datePublished": "2023-01-01T00:00:00Z",
"dateModified": "2023-01-01T00:00:00Z"
}
| docsearch:language | en |
| og:image | https://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png |
| None | 3 |
Links:
Viewport: width=device-width, initial-scale=1
Robots: noindex