-
Notifications
You must be signed in to change notification settings - Fork 620
PAL File for Arm Zephyr Executor Runner #12348
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12348
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 2bab70b with merge base a8070ec ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "release notes: none" |
Can you change the zephyr preset to use this file instead of minimal or posix? |
3ddc5c8
to
f816d77
Compare
For this you will have to change override the option: https://github.com/pytorch/executorch/blob/main/tools/cmake/preset/default.cmake#L38C3-L38C35 |
Hm, is this what we want for the preset? The PAL requires access to the Zephyr library, so if I set this in the preset, the build-preset test will fail unless we build the entire test with zephyr. Similarly, if I make the change to the preset file where I set:
The commands from the original zephyr cmake preset PR will error out. What do you think @larryliu0820? |
f816d77
to
b37e396
Compare
No CMake changes? |
@digantdesai, kind of the same comment as above in response to Mengwei's question about the preset. The problem is that this file can't be built without linking to an existing zephyr library. To avoid adding zephyr as a dependency, I made the PAL a header file instead of a cpp source file so that it never needs to be built, but can be included when Executorch is built as module of zephyr. |
b37e396
to
6877540
Compare
6877540
to
cbb7a36
Compare
…n a non-zephyr environment
cbb7a36
to
c78ee9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I think this is fine, but I really think we should have a CI job in ExecuTorch that:
- install zephyr and executorch as a module of it (you can check out a branch of zephyr)
- compile with arm runner and memory allocator and PAL
- run a hello world example
So maybe we can have a quick followup PR
### Summary Platform file for building Zephyr applications that use Executorch as a module. This is a simplified version of the file used in a Zephyr development branch [here](https://github.com/BujSet/zephyr/blob/executorch-module-integration/samples/modules/executorch/arm/hello_world/src/arm_zephyr_pal.hpp). In the future, it may be prudent to have a PAL file for arm bare metal (I imagine this would require a simple splicing of he PAL functions from the `arm_executor_runner.cpp` file). Leaving that task for a separate PR. ### Test plan Tested against the `arm_executor_runner.cpp` that is used in the [Arm-EthosU tutorial](https://docs.pytorch.org/executorch/main/tutorial-arm-ethos-u.html). Was able to successfully build the Arm Executor Runner, and run the simple add model.
Summary
Platform file for building Zephyr applications that use Executorch as a module. This is a simplified version of the file used in a Zephyr development branch here.
In the future, it may be prudent to have a PAL file for arm bare metal (I imagine this would require a simple splicing of he PAL functions from the
arm_executor_runner.cpp
file). Leaving that task for a separate PR.Test plan
Tested against the
arm_executor_runner.cpp
that is used in the Arm-EthosU tutorial. Was able to successfully build the Arm Executor Runner, and run the simple add model.