Skip to content

Commit d288076

Browse files
Gasoonjiafacebook-github-bot
authored andcommitted
add dim order into executorch concept documentation (#4349)
Summary: Pull Request resolved: #4349 as title Reviewed By: kirklandsign Differential Revision: D60081081 fbshipit-source-id: 76863ca87e156759427171c1a59ebfd1c124b372
1 parent 5d58203 commit d288076

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/source/concepts.md

+10
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ An interface that enables the ExecuTorch runtime to read from a file or other da
9393

9494
To run parts (or all) of a program on a specific backend (eg. XNNPACK) while the rest of the program (if any) runs on the basic ExecuTorch runtime. Delegation enables us to leverage the performance and efficiency benefits of specialized backends and hardware.
9595

96+
## Dim Order
97+
98+
ExecuTorch introduces `Dim Order` to describe tensor's memory format by returning a permutation of the dimensions, from the outermost to the innermost one.
99+
100+
For example, for a tensor with memory format [N, C, H, W], or [contiguous](https://pytorch.org/blog/tensor-memory-format-matters/) memory format, [0, 1, 2, 3] will be its dim order.
101+
102+
Also, for a tensor with memory format [N, H, W, C], or [channels_last memory format](https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html), we return [0, 2, 3, 1] for its dim order.
103+
104+
Currently ExecuTorch only supports dim order representation for [contiguous](https://pytorch.org/blog/tensor-memory-format-matters/) and [channels_last](https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html) memory format.
105+
96106
## DSP (Digital Signal Processor)
97107

98108
Specialized microprocessor chip with architecture optimized for digital signal processing.

0 commit comments

Comments
 (0)