pytorch / pytorch/executorch

Consolidate executor_runners

Open
#10,819 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue module: build/install
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🚀 The feature, motivation and pitch

Now we have so many executor runner targets, one for each backend. We should use a main one, and the link backends.

If you look at https://github.com/search?q=repo%3Apytorch%2Fexecutorch+executor_runner+language%3ACMake&type=code&l=CMake you will see we have quite a few add_executable(xyz_executor_runner ...)

Often they contain the same source as the main executor runner: https://github.com/pytorch/executorch/blob/df8fc6102a598f4c0c7ffbcabe3c137d2d67ee5f/CMakeLists.txt#L765-L775

and the difference is they link to the different library.

In this code, we can see for XNNPACK, we can link to it

https://github.com/pytorch/executorch/blob/df8fc6102a598f4c0c7ffbcabe3c137d2d67ee5f/CMakeLists.txt#L786-L788

Just do the similar stuff for all backends

  • qualcomm
  • arm
  • vulkan
  • openvino
  • mediatek
  • coreml
  • mps

After that, can we remove the extra xyz_executor_runner?

  • qualcomm_
  • arm_
  • vulkan_
  • openvino_
  • mediatek_
  • coreml_
  • mps_
  • xnnpack_
Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @larryliu0820 @jathu

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CMakeLists.txt around the referenced executor_runner definitions and compare the main target with the XNNPACK linking example. Trace the executor runner targets for Qualcomm, Arm, Vulkan, OpenVINO, MediaTek, Core ML, MPS, and XNNPACK. Done means the backends use the consolidated runner where applicable and the listed extra targets can be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.