Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ Topics in this section will help you get started with ExecuTorch.
:hidden:

devtools-overview
sdk-bundled-io
sdk-etrecord
sdk-etdump
sdk-profiling
sdk-debugging
sdk-inspector
bundled-io
etrecord
etdump
runtime-profiling
model-debugging
model-inspector
memory-planning-inspection
sdk-delegate-integration
devtools-tutorial
Expand Down
4 changes: 2 additions & 2 deletions docs/source/runtime-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The runtime is also responsible for:
semantics of those operators.
* Dispatching predetermined sections of the model to [backend
delegates](compiler-delegate-and-partitioner.md) for acceleration.
* Optionally gathering [profiling data](sdk-profiling.md) during load and
* Optionally gathering [profiling data](runtime-profiling.md) during load and
execution.

## Design Goals
Expand Down Expand Up @@ -159,7 +159,7 @@ For more details about the ExecuTorch runtime, please see:
* [Simplified Runtime APIs Tutorial](extension-module.md)
* [Runtime Build and Cross Compilation](runtime-build-and-cross-compilation.md)
* [Runtime Platform Abstraction Layer](runtime-platform-abstraction-layer.md)
* [Runtime Profiling](sdk-profiling.md)
* [Runtime Profiling](runtime-profiling.md)
* [Backends and Delegates](compiler-delegate-and-partitioner.md)
* [Backend Delegate Implementation](runtime-backend-delegate-implementation-and-linking.md)
* [Kernel Library Overview](kernel-library-overview.md)
23 changes: 23 additions & 0 deletions docs/source/runtime-profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Profiling Models in ExecuTorch

Profiling in ExecuTorch gives users access to these runtime metrics:
- Model Load Time.
- Operator Level Execution Time.
- Delegate Execution Time.
- If the delegate that the user is calling into has been integrated with the [Developer Tools](./delegate-debugging.md), then users will also be able to access delegated operator execution time.
- End-to-end Inference Execution Time.

One uniqe aspect of ExecuTorch Profiling is the ability to link every runtime executed operator back to the exact line of python code from which this operator originated. This capability enables users to easily identify hotspots in their model, source them back to the exact line of Python code, and optimize if chosen to.

We provide access to all the profiling data via the Python [Inspector API](./model-inspector.rst). The data mentioned above can be accessed through these interfaces, allowing users to perform any post-run analysis of their choice.

## Steps to Profile a Model in ExecuTorch

1. [Optional] Generate an [ETRecord](./etrecord.rst) while you're exporting your model. If provided this will enable users to link back profiling details to eager model source code (with stack traces and module hierarchy).
2. Build the runtime with the pre-processor flags that enable profiling. Detailed in the [ETDump documentation](./etdump.md).
3. Run your Program on the ExecuTorch runtime and generate an [ETDump](./etdump.md).
4. Create an instance of the [Inspector API](./model-inspector.rst) by passing in the ETDump you have sourced from the runtime along with the optionally generated ETRecord from step 1.
- Through the Inspector API, users can do a wide range of analysis varying from printing out performance details to doing more finer granular calculation on module level.


Please refer to the [Developer Tools tutorial](./tutorials/devtools-integration-tutorial.rst) for a step-by-step walkthrough of the above process on a sample model.
22 changes: 1 addition & 21 deletions docs/source/sdk-profiling.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Profiling Models in ExecuTorch

Profiling in ExecuTorch gives users access to these runtime metrics:
- Model Load Time.
- Operator Level Execution Time.
- Delegate Execution Time.
- If the delegate that the user is calling into has been integrated with the [Developer Tools](./sdk-delegate-integration.md), then users will also be able to access delegated operator execution time.
- End-to-end Inference Execution Time.

One uniqe aspect of ExecuTorch Profiling is the ability to link every runtime executed operator back to the exact line of python code from which this operator originated. This capability enables users to easily identify hotspots in their model, source them back to the exact line of Python code, and optimize if chosen to.

We provide access to all the profiling data via the Python [Inspector API](./sdk-inspector.rst). The data mentioned above can be accessed through these interfaces, allowing users to perform any post-run analysis of their choice.

## Steps to Profile a Model in ExecuTorch

1. [Optional] Generate an [ETRecord](./sdk-etrecord.rst) while you're exporting your model. If provided this will enable users to link back profiling details to eager model source code (with stack traces and module hierarchy).
2. Build the runtime with the pre-processor flags that enable profiling. Detailed in the [ETDump documentation](./sdk-etdump.md).
3. Run your Program on the ExecuTorch runtime and generate an [ETDump](./sdk-etdump.md).
4. Create an instance of the [Inspector API](./sdk-inspector.rst) by passing in the ETDump you have sourced from the runtime along with the optionally generated ETRecord from step 1.
- Through the Inspector API, users can do a wide range of analysis varying from printing out performance details to doing more finer granular calculation on module level.


Please refer to the [Developer Tools tutorial](./tutorials/devtools-integration-tutorial.rst) for a step-by-step walkthrough of the above process on a sample model.
Please update your link to <https://pytorch.org/executorch/main/runtime-profiling.html>. This URL will be deleted after v0.4.0.
Loading