-
Notifications
You must be signed in to change notification settings - Fork 774
Add compute_shaders_with_tensors sample #1438
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
base: main
Are you sure you want to change the base?
Add compute_shaders_with_tensors sample #1438
Conversation
Signed-off-by: Matthew Sloyan <[email protected]>
asuessenbach
left a comment
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.
This sample looks great! I especially like the good comments on all relevant aspects.
Just a couple of comments...
...ers/tensor_and_data_graph/compute_shaders_with_tensors/glsl/visualization_three_tensors.comp
Show resolved
Hide resolved
...tensions/tensor_and_data_graph/compute_shaders_with_tensors/compute_shaders_with_tensors.cpp
Show resolved
Hide resolved
...tensions/tensor_and_data_graph/compute_shaders_with_tensors/compute_shaders_with_tensors.cpp
Outdated
Show resolved
Hide resolved
...tensions/tensor_and_data_graph/compute_shaders_with_tensors/compute_shaders_with_tensors.cpp
Outdated
Show resolved
Hide resolved
...tensions/tensor_and_data_graph/compute_shaders_with_tensors/compute_shaders_with_tensors.cpp
Outdated
Show resolved
Hide resolved
...extensions/tensor_and_data_graph/compute_shaders_with_tensors/compute_shaders_with_tensors.h
Outdated
Show resolved
Hide resolved
|
Sample works fine for me, but has several validation errors: Using the latest SDK. |
Signed-off-by: Matthew Sloyan <[email protected]>
|
@asuessenbach I have addressed your comments, thank you for review and the suggestions! @SaschaWillems Thank you for trying this out! I will look into this with the latest SDK on our side. The tensor and data graph still isn't fully supported in the public validation layer yet, so this might be the cause. I have also added the guide to downloading and using the ML Extensions for Vulkan Emulation Layer to the description so other can try it out. |
Description
This sample demonstrates the usage of the VK_ARM_tensors and VK_ARM_data_graph extensions for machine learning inference. These allow you to define a neural network with TOSA operations and then execute inferences using hardware acceleration.
This is the third in a series of samples which shows a user how they can use compute shaders to produce inputs to a simple neural network. There is also a post-processing compute shader that modifies the output tensor.
The first sample can be found here: #1394
Build & run guide
If you would like to try out this new sample locally, we provide an emulation layer which allows them to run. This can be found here: https://github.com/arm/ai-ml-emulation-layer-for-vulkan. There is also a pre-built Windows package available here: https://www.arm.com/-/media/Files/developer/MLEmulationLayerForVulkan20251107 or you can grab this through our tutorial: https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/. This tutorial is for this first sample already merged (simple_tensor_and_data_graph), so it shows you everything needed to try it out. The guide and pre-built is only for Windows though, it does work on Linux, but this will require a manual build from the repository (https://github.com/arm/ai-ml-emulation-layer-for-vulkan). See the build guide for this.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: