-
Notifications
You must be signed in to change notification settings - Fork 685
Arm backend: Introduce support for a VGF runtime backend. #12426
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/12426
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit 043be0b with merge base de0554d ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Approved internally
only failing case is an http 429 error from HF. Unless we want to kick the tests off again, this just needs a review for the vulkan backend build changes and the introduction of the EXECUTORCH_BUILD_VGF option. The VGF backend code has been reviewed internally, but comments welcome of course. Builds/tests will be added once the final dependencies are upstream, which i hope to be a few weeks now. |
@digantdesai Do you mind taking a look since this touches some files outside of the Arm backend? |
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.
Thanks @robell !
if(EXECUTORCH_BUILD_VULKAN) | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/vulkan) | ||
endif() | ||
if(EXECUTORCH_BUILD_VGF) |
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.
Add a readme under backends/arm?
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.
We should to that! I will add one in a separate patch, I will have some updates for this soon
Please rebase and land once the CI is green (MMLU could be unrelated). |
This is a first version of a VGF runtime with spport for simple VGF files containing inputs and outputs (no weights) and will prepare the appropriate Vulkan structures and dispatch the workload following the normal backend delegate interfaces. It's intended to be extended to take advantage of the existing Vulkan delegate by replacing the basic object creation, and by re-using the VgfRepr in the appropriate way in either a "direct" Arm backend for testing and simple deployment, or integrated with the Vulkan backend to have good memory, sync and performance interop with existing Vulkan delegate operators. It re-uses the build-setup (headers, volk, etc) and vulkan_executor_runner and has been tested on linux only. This was on the simple S32 add kernel from the aot_arm_compiler, and a quantized and non-quantized mv2. It depends on a number of components which are not yet released, and the script for these is not included, as our third party dependencies are still evolving. Details: * Minor build fix for vulkan runtime. * Bump vulkan and volk headers to get tensor and graph extensions * First version of VGFBackend, dispatching on a vulkan layer driver * Will process the examples/models mv2 model and constants Signed-off-by: Rob Elliott <robert.elliott@arm.com> Change-Id: I1f278cb98872ae8c0675c72995f0249c038d07d8
Signed-off-by: Rob Elliott <robert.elliott@arm.com>
I don't believe the failures are related to my changes. The llama runner failure is present on trunk intermittently: b8fe100 The arm-backend test is for a path i've not modified and is also present intermittently on trunk: https://github.com/pytorch/executorch/actions/runs/16562716934/job/46835516691 the test-phi-3-mini case is present on trunk. |
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.
Unrelated CI failures. Approved
This is a first version of a VGF runtime with spport for simple VGF files containing inputs and outputs (no weights) and will prepare the appropriate Vulkan structures and dispatch the workload following the normal backend delegate interfaces. It's intended to be extended to take advantage of the existing Vulkan delegate by replacing the basic object creation, and by re-using the VgfRepr in the appropriate way in either a "direct" Arm backend for testing and simple deployment, or integrated with the Vulkan backend to have good memory, sync and performance interop with existing Vulkan delegate operators.
It re-uses the build-setup (headers, volk, etc) and vulkan_executor_runner and has been tested on linux only. This was on the simple S32 add kernel from the aot_arm_compiler, and a quantized and non-quantized mv2.
It depends on a number of components which are not yet released, and the script for these is not included, as our third party dependencies are still evolving.
Details:
Change-Id: I1f278cb98872ae8c0675c72995f0249c038d07d8
Testing
This change currently requires internal dependencies while a few pieces are upstreamed. The following is reproducable for those with full access to the ML SDK for Vulkan (https://github.com/arm/ai-ml-sdk-model-converter)
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218