CINXE.COM

Using the ExecuTorch Developer Tools to Profile a Model — ExecuTorch 0.5 documentation

<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Using the ExecuTorch Developer Tools to Profile a Model &mdash; ExecuTorch 0.5 documentation</title> <link rel="shortcut icon" href="../_static/ExecuTorch-Logo-cropped.svg"/> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <!-- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> --> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../_static/copybutton.css" type="text/css" /> <link rel="stylesheet" href="../_static/sg_gallery.css" type="text/css" /> <link rel="stylesheet" href="../_static/sg_gallery-binder.css" type="text/css" /> <link rel="stylesheet" href="../_static/sg_gallery-dataframe.css" type="text/css" /> <link rel="stylesheet" href="../_static/sg_gallery-rendered-html.css" type="text/css" /> <link rel="stylesheet" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css" type="text/css" /> <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" /> <link rel="stylesheet" href="../_static/progress-bar.css" type="text/css" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-T8XT4PS');</script> <!-- End Google Tag Manager --> <script src="../_static/js/modernizr.min.js"></script> <!-- Preload the theme fonts --> <link rel="preload" href="../_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="../_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="../_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="../_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="../_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="../_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <!-- Preload the katex fonts --> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" integrity="sha384-vSIIfh2YWi9wW0r9iZe7RJPrKwp6bG+s9QZMoITbCckVJqGCCRhc+ccxNcdpHuYu" crossorigin="anonymous"> </head> <div class="container-fluid header-holder tutorials-header" id="header-holder"> <div class="container"> <div class="header-container"> <a class="header-logo" href="https://pytorch.org/" aria-label="PyTorch"></a> <div class="main-menu"> <ul> <li class="main-menu-item"> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> Learn </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/get-started"> <span class=dropdown-title>Get Started</span> <p>Run PyTorch locally or get started quickly with one of the supported cloud platforms</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/tutorials"> <span class="dropdown-title">Tutorials</span> <p>Whats new in PyTorch tutorials</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/tutorials/beginner/basics/intro.html"> <span class="dropdown-title">Learn the Basics</span> <p>Familiarize yourself with PyTorch concepts and modules</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/tutorials/recipes/recipes_index.html"> <span class="dropdown-title">PyTorch Recipes</span> <p>Bite-size, ready-to-deploy PyTorch code examples</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/tutorials/beginner/introyt.html"> <span class="dropdown-title">Intro to PyTorch - YouTube Series</span> <p>Master PyTorch basics with our engaging YouTube tutorial series</p> </a> </div> </div> </li> <li> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> Ecosystem </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/ecosystem"> <span class="dropdown-title">Tools</span> <p>Learn about the tools and frameworks in the PyTorch Ecosystem</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/#community-module"> <span class=dropdown-title>Community</span> <p>Join the PyTorch developer community to contribute, learn, and get your questions answered</p> </a> <a class="nav-dropdown-item" href="https://discuss.pytorch.org/" target="_blank"> <span class=dropdown-title>Forums</span> <p>A place to discuss PyTorch code, issues, install, research</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/resources"> <span class=dropdown-title>Developer Resources</span> <p>Find resources and get questions answered</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/ecosystem/contributor-awards-2024"> <span class="dropdown-title">Contributor Awards - 2024</span> <p>Award winners announced at this year's PyTorch Conference</p> </a> </div> </div> </li> <li> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> Edge </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/edge"> <span class="dropdown-title">About PyTorch Edge</span> <p>Build innovative and privacy-aware AI experiences for edge devices</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/executorch-overview"> <span class="dropdown-title">ExecuTorch</span> <p>End-to-end solution for enabling on-device inference capabilities across mobile and edge devices</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/executorch/stable/index.html"> <span class="dropdown-title">ExecuTorch Docs</span> </a> </div> </div> </li> <li class="main-menu-item"> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> Docs </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/docs/stable/index.html"> <span class="dropdown-title">PyTorch</span> <p>Explore the documentation for comprehensive guidance on how to use PyTorch</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/pytorch-domains"> <span class="dropdown-title">PyTorch Domains</span> <p>Read the PyTorch Domains documentation to learn more about domain-specific libraries</p> </a> </div> </div> </li> <li> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> Blogs & News </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/blog/"> <span class="dropdown-title">PyTorch Blog</span> <p>Catch up on the latest technical news and happenings</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/community-blog"> <span class="dropdown-title">Community Blog</span> <p>Stories from the PyTorch ecosystem</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/videos"> <span class="dropdown-title">Videos</span> <p>Learn about the latest PyTorch tutorials, new, and more </p> <a class="nav-dropdown-item" href="https://pytorch.org/community-stories"> <span class="dropdown-title">Community Stories</span> <p>Learn how our community solves real, everyday machine learning problems with PyTorch</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/events"> <span class="dropdown-title">Events</span> <p>Find events, webinars, and podcasts</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/newsletter"> <span class="dropdown-title">Newsletter</span> <p>Stay up-to-date with the latest updates</p> </a> </div> </li> <li> <div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown"> <a class="with-down-arrow"> About </a> <div class="resources-dropdown-menu"> <a class="nav-dropdown-item" href="https://pytorch.org/foundation"> <span class="dropdown-title">PyTorch Foundation</span> <p>Learn more about the PyTorch Foundation</p> </a> <a class="nav-dropdown-item" href="https://pytorch.org/governing-board"> <span class="dropdown-title">Governing Board</span> </a> <a class="nav-dropdown-item" href="https://pytorch.org/credits"> <span class="dropdown-title">Cloud Credit Program</span> </a> <a class="nav-dropdown-item" href="https://pytorch.org/tac"> <span class="dropdown-title">Technical Advisory Council</span> </a> <a class="nav-dropdown-item" href="https://pytorch.org/staff"> <span class="dropdown-title">Staff</span> </a> <a class="nav-dropdown-item" href="https://pytorch.org/contact-us"> <span class="dropdown-title">Contact Us</span> </a> </div> </div> </li> <li class="main-menu-item"> <div class="no-dropdown"> <a href="https://pytorch.org/join" data-cta="join"> Become a Member </a> </div> </li> <li> <div class="main-menu-item"> <a href="https://github.com/pytorch/pytorch" class="github-icon"> </a> </div> </li> <!--- TODO: This block adds the search icon to the nav bar. We will enable it later. <li> <div class="main-menu-item"> <a href="https://github.com/pytorch/pytorch" class="search-icon"> </a> </div> </li> ---> </ul> </div> <a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a> </div> </div> </div> <body class="pytorch-body"> <div class="table-of-contents-link-wrapper"> <span>Table of Contents</span> <a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a> </div> <nav data-toggle="wy-nav-shift" class="pytorch-left-menu" id="pytorch-left-menu"> <div class="pytorch-side-scroll"> <div class="pytorch-menu pytorch-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <div class="pytorch-left-menu-search"> <div class="version"> <a href='https://pytorch.org/executorch/versions.html'>0.5 &#x25BC</a> </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search Docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <p class="caption" role="heading"><span class="caption-text">Introduction</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../intro-overview.html">ExecuTorch Overview</a></li> <li class="toctree-l1"><a class="reference internal" href="../intro-how-it-works.html">How ExecuTorch Works</a></li> <li class="toctree-l1"><a class="reference internal" href="../getting-started-architecture.html">High-level Architecture and Components of ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../concepts.html">ExecuTorch Concepts</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Getting Started</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../getting-started-setup.html">Setting Up ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../export-overview.html">Exporting to ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../runtime-build-and-cross-compilation.html">Building with CMake</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Tutorials</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="export-to-executorch-tutorial.html">Exporting to ExecuTorch Tutorial</a></li> <li class="toctree-l1"><a class="reference internal" href="../running-a-model-cpp-tutorial.html">Running an ExecuTorch Model in C++ Tutorial</a></li> <li class="toctree-l1"><a class="reference internal" href="../extension-module.html">Running an ExecuTorch Model Using the Module Extension in C++</a></li> <li class="toctree-l1"><a class="reference internal" href="../extension-tensor.html">Managing Tensor Memory in C++</a></li> <li class="toctree-l1"><a class="reference internal" href="devtools-integration-tutorial.html">Using the ExecuTorch Developer Tools to Profile a Model</a></li> <li class="toctree-l1"><a class="reference internal" href="../apple-runtime.html">Integrating and Running ExecuTorch on Apple Platforms</a></li> <li class="toctree-l1"><a class="reference internal" href="../demo-apps-ios.html">Building an ExecuTorch iOS Demo App</a></li> <li class="toctree-l1"><a class="reference internal" href="../demo-apps-android.html">Building an ExecuTorch Android Demo App</a></li> <li class="toctree-l1"><a class="reference internal" href="../examples-end-to-end-to-lower-model-to-delegate.html">Lowering a Model as a Delegate</a></li> <li class="toctree-l1"><a class="reference internal" href="../tutorial-xnnpack-delegate-lowering.html">Building and Running ExecuTorch with XNNPACK Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-vulkan.html">Building and Running ExecuTorch with the Vulkan Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../executorch-arm-delegate-tutorial.html">Building and Running ExecuTorch with ARM Ethos-U Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-coreml.html">Building and Running ExecuTorch with Core ML Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-mediatek-backend.html">Building and Running ExecuTorch with MediaTek Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-mps.html">Building and Running ExecuTorch with MPS Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-qualcomm-ai-engine-direct-backend.html">Building and Running ExecuTorch with Qualcomm AI Engine Direct Backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../build-run-xtensa.html">Building and Running ExecuTorch on Xtensa HiFi4 DSP</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Working with LLMs</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../llm/llama.html">Llama</a></li> <li class="toctree-l1"><a class="reference internal" href="../llm/llama-demo-android.html">Llama on Android</a></li> <li class="toctree-l1"><a class="reference internal" href="../llm/llama-demo-ios.html">Llama on iOS</a></li> <li class="toctree-l1"><a class="reference internal" href="../llm/build-run-llama3-qualcomm-ai-engine-direct-backend.html">Llama on Android via Qualcomm backend</a></li> <li class="toctree-l1"><a class="reference internal" href="../llm/getting-started.html">Intro to LLMs in Executorch</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">API Reference</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../export-to-executorch-api-reference.html">Export to ExecuTorch API Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../executorch-runtime-api-reference.html">ExecuTorch Runtime API Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../runtime-python-api-reference.html">ExecuTorch Runtime Python API Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../api-life-cycle.html">ExecuTorch API Life Cycle and Deprecation Policy</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">IR Specification</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../ir-exir.html">Export IR Specification</a></li> <li class="toctree-l1"><a class="reference internal" href="../ir-ops-set-definition.html">Definition of the Core ATen Operator Set</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Compiler Entry Points</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../compiler-delegate-and-partitioner.html">Backend and Delegate</a></li> <li class="toctree-l1"><a class="reference internal" href="../compiler-backend-dialect.html">Backend Dialect</a></li> <li class="toctree-l1"><a class="reference internal" href="../compiler-custom-compiler-passes.html">Custom Compiler Passes and Partitioners</a></li> <li class="toctree-l1"><a class="reference internal" href="../compiler-memory-planning.html">Memory Planning</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Runtime</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../runtime-overview.html">ExecuTorch Runtime Overview</a></li> <li class="toctree-l1"><a class="reference internal" href="../runtime-backend-delegate-implementation-and-linking.html">Backend Delegate Implementation and Linking</a></li> <li class="toctree-l1"><a class="reference internal" href="../runtime-platform-abstraction-layer.html">Runtime Platform Abstraction Layer (PAL)</a></li> <li class="toctree-l1"><a class="reference internal" href="../portable-cpp-programming.html">Portable C++ Programming</a></li> <li class="toctree-l1"><a class="reference internal" href="../pte-file-format.html"><code class="docutils literal notranslate"><span class="pre">.pte</span></code> file format</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Quantization</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../quantization-overview.html">Quantization Overview</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Kernel Library</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../kernel-library-overview.html">Overview of ExecuTorch’s Kernel Libraries</a></li> <li class="toctree-l1"><a class="reference internal" href="../kernel-library-custom-aten-kernel.html">Kernel Registration</a></li> <li class="toctree-l1"><a class="reference internal" href="../kernel-library-selective-build.html">Kernel Library Selective Build</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Backend Delegates</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../native-delegates-executorch-xnnpack-delegate.html">ExecuTorch XNNPACK delegate</a></li> <li class="toctree-l1"><a class="reference internal" href="../native-delegates-executorch-vulkan-delegate.html">ExecuTorch Vulkan Delegate</a></li> <li class="toctree-l1"><a class="reference internal" href="../backend-delegates-integration.html">Integrating a Backend Delegate into ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../backend-delegates-dependencies.html">Third-Party Dependency Management for Backend Delegates</a></li> <li class="toctree-l1"><a class="reference internal" href="../debug-backend-delegate.html">Debug Backend Delegate</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Developer Tools</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../devtools-overview.html">Introduction to the ExecuTorch Developer Tools</a></li> <li class="toctree-l1"><a class="reference internal" href="../bundled-io.html">Bundled Program – a Tool for ExecuTorch Model Validation</a></li> <li class="toctree-l1"><a class="reference internal" href="../etrecord.html">Prerequisite | ETRecord - ExecuTorch Record</a></li> <li class="toctree-l1"><a class="reference internal" href="../etdump.html">Prerequisite | ETDump - ExecuTorch Dump</a></li> <li class="toctree-l1"><a class="reference internal" href="../runtime-profiling.html">Profiling Models in ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../model-debugging.html">Debugging Models in ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../model-inspector.html">Inspector APIs</a></li> <li class="toctree-l1"><a class="reference internal" href="../memory-planning-inspection.html">Memory Planning Inspection in ExecuTorch</a></li> <li class="toctree-l1"><a class="reference internal" href="../delegate-debugging.html">Delegate Debugging</a></li> <li class="toctree-l1"><a class="reference internal" href="../devtools-tutorial.html">Developer Tools Usage Tutorial</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Contributing</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing to ExecuTorch</a></li> </ul> </div> </div> </nav> <div class="pytorch-container"> <div class="pytorch-page-level-bar" id="pytorch-page-level-bar"> <div class="pytorch-breadcrumbs-wrapper"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="pytorch-breadcrumbs"> <li> <a href="../index.html"> Docs </a> &gt; </li> <li>Using the ExecuTorch Developer Tools to Profile a Model</li> <li class="pytorch-breadcrumbs-aside"> <a href="../_sources/tutorials/sdk-integration-tutorial.rst.txt" rel="nofollow"><img src="../_static/images/view-page-source-icon.svg"></a> </li> </ul> </div> </div> <div class="pytorch-shortcuts-wrapper" id="pytorch-shortcuts-wrapper"> Shortcuts </div> </div> <section data-toggle="wy-nav-shift" id="pytorch-content-wrap" class="pytorch-content-wrap"> <div class="pytorch-content-left"> <div class="pytorch-call-to-action-links"> <div id="tutorial-type">tutorials/sdk-integration-tutorial</div> <div id="google-colab-link"> <img class="call-to-action-img" src="../_static/images/pytorch-colab.svg" /> <div class="call-to-action-desktop-view">Run in Google Colab</div> <div class="call-to-action-mobile-view">Colab</div> </div> <div id="download-notebook-link"> <img class="call-to-action-notebook-img" src="../_static/images/pytorch-download.svg" /> <div class="call-to-action-desktop-view">Download Notebook</div> <div class="call-to-action-mobile-view">Notebook</div> </div> <div id="github-view-link"> <img class="call-to-action-img" src="../_static/images/pytorch-github.svg" /> <div class="call-to-action-desktop-view">View on GitHub</div> <div class="call-to-action-mobile-view">GitHub</div> </div> </div> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T8XT4PS" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <div class="rst-content"> <div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article"> <article itemprop="articleBody" id="pytorch-article" class="pytorch-article"> <div class="sphx-glr-download-link-note admonition note"> <p class="admonition-title">Note</p> <p><a class="reference internal" href="#sphx-glr-download-tutorials-sdk-integration-tutorial-py"><span class="std std-ref">Go to the end</span></a> to download the full example code</p> </div> <div class="sphx-glr-example-title section" id="using-the-executorch-developer-tools-to-profile-a-model"> <span id="sphx-glr-tutorials-sdk-integration-tutorial-py"></span><h1>Using the ExecuTorch Developer Tools to Profile a Model<a class="headerlink" href="#using-the-executorch-developer-tools-to-profile-a-model" title="Permalink to this heading">¶</a></h1> <p>Please update your link to &lt;<a class="reference external" href="https://pytorch.org/executorch/main/tutorials/devtools-integration-tutorial.html">https://pytorch.org/executorch/main/tutorials/devtools-integration-tutorial.html</a>&gt;. This URL will be deleted after v0.4.0.</p> <p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 0.000 seconds)</p> <div class="sphx-glr-footer sphx-glr-footer-example docutils container" id="sphx-glr-download-tutorials-sdk-integration-tutorial-py"> <div class="sphx-glr-download sphx-glr-download-python docutils container"> <p><a class="reference download internal" download="" href="../_downloads/00f28feeccb75cde665e2acd0ca1eb2e/sdk-integration-tutorial.py"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre">sdk-integration-tutorial.py</span></code></a></p> </div> <div class="sphx-glr-download sphx-glr-download-jupyter docutils container"> <p><a class="reference download internal" download="" href="../_downloads/bdc57fac5b5984987273d0fa0d40fbe6/sdk-integration-tutorial.ipynb"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Jupyter</span> <span class="pre">notebook:</span> <span class="pre">sdk-integration-tutorial.ipynb</span></code></a></p> </div> </div> <p class="sphx-glr-signature"><a class="reference external" href="https://sphinx-gallery.github.io">Gallery generated by Sphinx-Gallery</a></p> </div> </article> </div> <footer> <hr> <div role="contentinfo"> <p> &copy; Copyright 2024, ExecuTorch. </p> </div> <div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </div> </footer> </div> </div> <div class="pytorch-content-right" id="pytorch-content-right"> <div class="pytorch-right-menu" id="pytorch-right-menu"> <div class="pytorch-side-scroll" id="pytorch-side-scroll-right"> <ul> <li><a class="reference internal" href="#">Using the ExecuTorch Developer Tools to Profile a Model</a></li> </ul> </div> </div> </div> </section> </div> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/clipboard.min.js"></script> <script src="../_static/copybutton.js"></script> <script src="../_static/design-tabs.js"></script> <script src="../_static/js/progress-bar.js"></script> <script type="text/javascript" src="../_static/js/vendor/popper.min.js"></script> <script type="text/javascript" src="../_static/js/vendor/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script> <script type="text/javascript" src="../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(false); }); </script> <script script type="text/javascript"> var collapsedSections = ['Introduction', 'Getting Started', 'Working with LLMs', 'Exporting to ExecuTorch', 'API Reference', 'IR Specification', 'Compiler Entry Points', 'Runtime', 'Quantization', 'Kernel Library', 'Native Delegates', 'Backend Delegates', 'SDK', 'Tutorials'] </script> <script type="text/javascript"> // Handle the right navigation in third level pages. Without this // in third level, only the last item always selected. This is a hacky // way and we should revise it eventually. // #side-scroll-highlight is disabled in .css. // Get all menu items var menuItems = document.querySelectorAll('.pytorch-right-menu a.reference.internal'); // Add a click event listener to each menu item for (var i = 0; i < menuItems.length; i++) { menuItems[i].addEventListener('click', function(event) { // Remove the 'side-scroll-highlight-local' class from all menu items for (var j = 0; j < menuItems.length; j++) { menuItems[j].classList.remove('side-scroll-highlight-local'); } // Add the 'side-scroll-highlight-local' class to the clicked item event.target.classList.add('side-scroll-highlight-local'); }); } </script> <script type="text/javascript"> $(document).ready(function () { // Patch links on interactive tutorial pages to point // to the correct ExecuTorch URLs. var downloadNote = $(".sphx-glr-download-link-note.admonition.note"); if (downloadNote.length >= 1) { var tutorialUrl = $("#tutorial-type").text().substring($("#tutorial-type").text().indexOf("tutorials/") + 9); // 9 is the length of "tutorials/" var githubLink = "https://github.com/pytorch/executorch/blob/main/docs/source/tutorials_source" + tutorialUrl + ".py", notebookLink = $(".reference.download")[1].href, notebookDownloadPath = notebookLink.split('_downloads')[1], colabLink = "https://colab.research.google.com/github/pytorch/executorch/blob/gh-pages/main/_downloads" + notebookDownloadPath; $(".pytorch-call-to-action-links a[data-response='Run in Google Colab']").attr("href", colabLink); $(".pytorch-call-to-action-links a[data-response='View on Github']").attr("href", githubLink); } // Patch the "GitHub" link at the top of the page // to point to the ExecuTorch repo. var overwrite = function (_) { if ($(this).length > 0) { $(this)[0].href = "https://github.com/pytorch/executorch" } } // PC $(".main-menu a:contains('GitHub')").each(overwrite); // Overwrite link to Tutorials and Get Started top navigation. If these sections are moved // this overrides need to be updated. $(".main-menu a:contains('Tutorials')").attr("href", "https://pytorch.org/executorch/stable/index.html#tutorials-and-examples"); $(".main-menu a:contains('Get Started')").attr("href", "https://pytorch.org/executorch/stable/getting-started-setup.html"); // Mobile $(".mobile-menu a:contains('Github')").each(overwrite); // Overwrite link to Tutorials and Get Started top navigation. If these sections are moved // this overrides need to be updated. $(".mobile-menu a:contains('Tutorials')").attr("href", "https://pytorch.org/executorch/stable/index.html#tutorials-and-examples"); $(".mobile-menu a:contains('Get Started')").attr("href", "https://pytorch.org/executorch/stable/getting-started-setup.html"); }); </script> <!-- Begin Footer --> <div class="container-fluid docs-tutorials-resources" id="docs-tutorials-resources"> <div class="container"> <div class="row"> <div class="col-md-4 text-center"> <h2>Docs</h2> <p>Access comprehensive developer documentation for PyTorch</p> <a class="with-right-arrow" href="https://pytorch.org/docs/stable/index.html">View Docs</a> </div> <div class="col-md-4 text-center"> <h2>Tutorials</h2> <p>Get in-depth tutorials for beginners and advanced developers</p> <a class="with-right-arrow" href="https://pytorch.org/tutorials">View Tutorials</a> </div> <div class="col-md-4 text-center"> <h2>Resources</h2> <p>Find development resources and get your questions answered</p> <a class="with-right-arrow" href="https://pytorch.org/resources">View Resources</a> </div> </div> </div> </div> <footer class="site-footer"> <div class="container footer-container"> <div class="footer-logo-wrapper"> <a href="https://pytorch.org/" class="footer-logo"></a> </div> <div class="footer-links-wrapper"> <div class="footer-links-col"> <ul> <li class="list-title"><a href="https://pytorch.org/">PyTorch</a></li> <li><a href="https://pytorch.org/get-started">Get Started</a></li> <li><a href="https://pytorch.org/features">Features</a></li> <li><a href="https://pytorch.org/ecosystem">Ecosystem</a></li> <li><a href="https://pytorch.org/blog/">Blog</a></li> <li><a href="https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md">Contributing</a></li> </ul> </div> <div class="footer-links-col"> <ul> <li class="list-title"><a href="https://pytorch.org/resources">Resources</a></li> <li><a href="https://pytorch.org/tutorials">Tutorials</a></li> <li><a href="https://pytorch.org/docs/stable/index.html">Docs</a></li> <li><a href="https://discuss.pytorch.org" target="_blank">Discuss</a></li> <li><a href="https://github.com/pytorch/pytorch/issues" target="_blank">Github Issues</a></li> <li><a href="https://pytorch.org/assets/brand-guidelines/PyTorch-Brand-Guidelines.pdf" target="_blank">Brand Guidelines</a></li> </ul> </div> <div class="footer-links-col"> <ul> <li class="list-title">Stay up to date</li> <li><a href="https://www.facebook.com/pytorch" target="_blank">Facebook</a></li> <li><a href="https://twitter.com/pytorch" target="_blank">Twitter</a></li> <li><a href="https://www.youtube.com/pytorch" target="_blank">YouTube</a></li> <li><a href="https://www.linkedin.com/company/pytorch" target="_blank">LinkedIn</a></li> </ul> </div> <div class="footer-links-col"> <ul> <li class="list-title">PyTorch Podcasts</li> <li><a href="https://open.spotify.com/show/6UzHKeiy368jKfQMKKvJY5" target="_blank">Spotify</a></li> <li><a href="https://podcasts.apple.com/us/podcast/pytorch-developer-podcast/id1566080008" target="_blank">Apple</a></li> <li><a href="https://www.google.com/podcasts?feed=aHR0cHM6Ly9mZWVkcy5zaW1wbGVjYXN0LmNvbS9PQjVGa0lsOA%3D%3D" target="_blank">Google</a></li> <li><a href="https://music.amazon.com/podcasts/7a4e6f0e-26c2-49e9-a478-41bd244197d0/PyTorch-Developer-Podcast?" target="_blank">Amazon</a></li> </ul> </div> </div> <div class="privacy-policy"> <ul> <li class="privacy-policy-links"><a href="https://www.linuxfoundation.org/terms/" target="_blank">Terms</a></li> <li class="privacy-policy-links">|</li> <li class="privacy-policy-links"><a href="https://www.linuxfoundation.org/privacy-policy/" target="_blank">Privacy</a></li> </ul> </div> <div class="copyright"> <p>© Copyright The Linux Foundation. The PyTorch Foundation is a project of The Linux Foundation. For web site terms of use, trademark policy and other policies applicable to The PyTorch Foundation please see <a href="https://www.linuxfoundation.org/policies/">www.linuxfoundation.org/policies/</a>. The PyTorch Foundation supports the PyTorch open source project, which has been established as PyTorch Project a Series of LF Projects, LLC. For policies applicable to the PyTorch Project a Series of LF Projects, LLC, please see <a href="https://www.lfprojects.org/policies/">www.lfprojects.org/policies/</a>.</p> </div> </div> </footer> <div class="cookie-banner-wrapper"> <div class="container"> <p class="gdpr-notice">To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: <a href="https://www.facebook.com/policies/cookies/">Cookies Policy</a>.</p> <img class="close-button" src="../_static/images/pytorch-x.svg"> </div> </div> <!-- End Footer --> <!-- Begin Mobile Menu --> <div class="mobile-main-menu"> <div class="container-fluid"> <div class="container"> <div class="mobile-main-menu-header-container"> <a class="header-logo" href="https://pytorch.org/" aria-label="PyTorch"></a> <a class="main-menu-close-button" href="#" data-behavior="close-mobile-menu"></a> </div> </div> </div> <div class="mobile-main-menu-links-container"> <div class="main-menu"> <ul> <li class="resources-mobile-menu-title"> <a>Learn</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/get-started">Get Started</a> </li> <li> <a href="https://pytorch.org/tutorials">Tutorials</a> </li> <li> <a href="https://pytorch.org/tutorials/beginner/basics/intro.html">Learn the Basics</a> </li> <li> <a href="https://pytorch.org/tutorials/recipes/recipes_index.html">PyTorch Recipes</a> </li> <li> <a href="https://pytorch.org/tutorials/beginner/introyt.html">Introduction to PyTorch - YouTube Series</a> </li> </ul> <li class="resources-mobile-menu-title"> <a>Ecosystem</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/ecosystem">Tools</a> </li> <li> <a href="https://pytorch.org/#community-module">Community</a> </li> <li> <a href="https://discuss.pytorch.org/">Forums</a> </li> <li> <a href="https://pytorch.org/resources">Developer Resources</a> </li> <li> <a href="https://pytorch.org/ecosystem/contributor-awards-2023">Contributor Awards - 2024</a> </li> </ul> <li class="resources-mobile-menu-title"> <a>Edge</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/edge">About PyTorch Edge</a> </li> <li> <a href="https://pytorch.org/executorch-overview">ExecuTorch</a> </li> <li> <a href="https://pytorch.org/executorch/stable/index.html">ExecuTorch Documentation</a> </li> </ul> <li class="resources-mobile-menu-title"> <a>Docs</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/docs/stable/index.html">PyTorch</a> </li> <li> <a href="https://pytorch.org/pytorch-domains">PyTorch Domains</a> </li> </ul> <li class="resources-mobile-menu-title"> <a>Blog & News</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/blog/">PyTorch Blog</a> </li> <li> <a href="https://pytorch.org/community-blog">Community Blog</a> </li> <li> <a href="https://pytorch.org/videos">Videos</a> </li> <li> <a href="https://pytorch.org/community-stories">Community Stories</a> </li> <li> <a href="https://pytorch.org/events">Events</a> </li> <li> <a href="https://pytorch.org/newsletter">Newsletter</a> </li> </ul> <li class="resources-mobile-menu-title"> <a>About</a> </li> <ul class="resources-mobile-menu-items"> <li> <a href="https://pytorch.org/foundation">PyTorch Foundation</a> </li> <li> <a href="https://pytorch.org/governing-board">Governing Board</a> </li> <li> <a href="https://pytorch.org/credits">Cloud Credit Program</a> </li> <li> <a href="https://pytorch.org/tac">Technical Advisory Council</a> </li> <li> <a href="https://pytorch.org/staff">Staff</a> </li> <li> <a href="https://pytorch.org/contact-us">Contact Us</a> </li> </ul> </ul> </div> </div> </div> <!-- End Mobile Menu --> <script type="text/javascript" src="../_static/js/vendor/anchor.min.js"></script> <script type="text/javascript"> $(document).ready(function() { mobileMenu.bind(); mobileTOC.bind(); pytorchAnchors.bind(); sideMenus.bind(); scrollToAnchor.bind(); highlightNavigation.bind(); mainMenuDropdown.bind(); filterTags.bind(); // Add class to links that have code blocks, since we cannot create links in code blocks $("article.pytorch-article a span.pre").each(function(e) { $(this).closest("a").addClass("has-code"); }); }) </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10