Skip to content

Initial framework of an ethos-u runtime backend #3 #659

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

Closed
wants to merge 25 commits into from

Conversation

robell
Copy link
Collaborator

@robell robell commented Oct 6, 2023

Cleaned up ethos-u runtime flow, replaces #595

Added shell of runtime Arm Backend for Ethos-U

./backends/arm/cmake/build.sh will pull the appropriate compiler and build the ethos-u driver and delegate and produce the libraries needed to link an application in, which can run a delegated .pte with the revised vela_bin_stream form contained in these patches.

Currently supports .pte files stored in SRAM.

robell added 18 commits October 6, 2023 07:46
 - Basic runtime targeting Corstone-300 with U55
 - cross compile support with a cmake toolchain (Arm baremetal build)
 - support for a few models AoT -> TOSA -> Vela -> U55 hardware
 - dependencies on the ethos-u core driver and cmsis (submodules)

Signed-off-by: Rob Elliott <[email protected]>
Signed-off-by: Rob Elliott <[email protected]>
 * There is a toolchain/linking issue mixing hard and soft float ABI
which is causing the test to fail, but the structure is there and the
delegate is registered.

Signed-off-by: Rob Elliott <[email protected]>
 * Override the default CPU in cmake which was causing a mixture of FPU
   and ABI flags to be passed to different compilation stages.
 * Updated fallback logging implementation in delegate app to fix
   sporadic crash

Signed-off-by: Rob Elliott <[email protected]>
 * uses the simple_add model to run through the AoT flow and the various
   debug options for looking at export.
 * produces a .pte file for runtime delegation on the ArmBackend for
   Ethos-U55 platforms

Signed-off-by: Rob Elliott <[email protected]>
 * export the list of offset from AoT floq
 * appropriately copy inputs and ouputs to/from SRAM

Signed-off-by: Rob Elliott <[email protected]>
Signed-off-by: Rob Elliott <[email protected]>
 * File moved to new path in examples
 * fix arg handling and md5sum for setup scripts

Signed-off-by: Rob Elliott <[email protected]>
@netlify
Copy link

netlify bot commented Oct 6, 2023

Deploy Preview for resplendent-gnome-14e531 canceled.

Name Link
🔨 Latest commit 709a688
🔍 Latest deploy log https://app.netlify.com/sites/resplendent-gnome-14e531/deploys/652072de622f4c00082b4740

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 6, 2023
 * Introduction of BI_INT to have a small set of pure int tests
 * added either vela or tosa output from compilation
 * Fixed tosa e2e tests to use tosa output form
 * unit tests currently use tosa due to missing vela dependency
 * vela e2e testing runs with default compile flags and emits to .pte

Signed-off-by: Rob Elliott <[email protected]>
Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know since you are waiting I am submitting these as I go. Just finished looked at the AoT python code. And next looking at the runtime bits.

Signed-off-by: Rob Elliott <[email protected]>
Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

round 2 for delegate runtime

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is it. Not sure if I missed anything, I am not the biggest fan of this GH UI :\

robell added 2 commits October 6, 2023 18:52
Signed-off-by: Rob Elliott <[email protected]>
Signed-off-by: Rob Elliott <[email protected]>
Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me thanks @robell - this was a difficult one.
Created Issue #666 as a follow up.

robell added 3 commits October 6, 2023 20:06
Signed-off-by: Rob Elliott <[email protected]>
Signed-off-by: Rob Elliott <[email protected]>
@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.


#include <cstring>
#include <memory>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to see if we can get away without this std::container. It will be better from size and portability point of view. Other than input/output we aren't using it anywhere else so should be easy to get rid of it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#677 FYI

@facebook-github-bot
Copy link
Contributor

@digantdesai merged this pull request in 78197a3.

@robell robell added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Jul 4, 2024
Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Update support tables and explanatory text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants