Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Good First Issue] [Snippets] [ARM]: Support Transpose execution #28488

Open
a-sidorova opened this issue Jan 16, 2025 · 2 comments
Open

[Good First Issue] [Snippets] [ARM]: Support Transpose execution #28488

a-sidorova opened this issue Jan 16, 2025 · 2 comments
Assignees
Labels
category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: arm OpenVINO on ARM / ARM64

Comments

@a-sidorova
Copy link
Contributor

Context

Snippets is a highly specialized JIT (just-in-time) compiler for computational graphs. It provides a scalable approach to operations' fusions and enablement. As a typical compiler, Snippets have frontend (tokenizer), optimizer and backend (generator).

The first of the Snippets pipeline, Tokenization, identifies parts of the initial ov::Model that can be lowered by Snippets efficiently, and tokenizes them into one whole node - Subgraph.
The second step of the pipeline (Optimizer) is applying common and device-specific optimizations to Subgraph and getting lowered representation of tokenized Subgraph.
Finally, the last stage is code emission. The target generator maps every operation in the IR to a binary code emitter JIT Emitter, which is then used to produce a piece of executable code. As a result, we produce an executable that performs calculations described by the initial input ov::Model.

The purpose of this issue is support of Transpose operation execution using Snippets for ARM devices.
Note that Snippets decomposes Transpose into memory operations LoadReorder (this is Load op with transposed input strides) and Store using TransposeDecomposition pass. This pass is called on the second step of the Snippets pipeline - Optimizer.

Prerequisites

Recommended to use ARM CPU based platform for development (e.g. Mac, Raspberry Pi etc). The cross-compilation with an emulator (e.g. QEMU) using is still option: cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/arm64.toolchain.cmake ...

What needs to be done?

  • Enable tests which are currently disabled on aarch64 platforms. Need to update this line to enable smoke*Snippets*_Transpose_* tests. Launch tests (how to launch them - please see the section Tests below). There should be failed tests.
  • The tests are failed because the target AArch64 machine doesn't know about LoadReshape op and the generator cannot emit the binary code. Add mapping LoadReorder op to the corresponding binary code emitter in cpu target machine.
  • Launch tests again - the tests should be green.

Tests

Tests are disabled in default build, so ensure to add -DENABLE_TESTS=ON into cmake command.

GoogleTest is used for testing. CPU functional test target is ov_cpu_func_tests. You can use GoogleTest filter:

./bin/[platform]/[build_type]/ov_cpu_func_tests --gtest_filter="*smoke*Snippets*Transpose*"

Examples

Resources

Contact points

@a-sidorova, @dmitry-gorokhov

@a-sidorova a-sidorova added category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: arm OpenVINO on ARM / ARM64 labels Jan 16, 2025
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Jan 16, 2025
@0xfedcafe
Copy link
Contributor

.take

Copy link
Contributor

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

@a-sidorova a-sidorova moved this from Contributors Needed to Assigned in Good first issues Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: arm OpenVINO on ARM / ARM64
Projects
Status: Assigned
Development

No branches or pull requests

2 participants