Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ Before building and running the samples, ensure the following tools are installe
- Python 3
- Git

In VSCode create a new folder for this project then make sure you have the following extensions:
* C/C++ From Microsoft
* CMake Tools From Microsoft

![C/C++ tools extension](images/c-ext.png)

![Cmake tools extension](images/cmake-ext.png)


Create a Venv in Python (3.13 was used in the creation of this Guide) and run the following commands

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of writing the instruction out, I would simply insert the command

python3.13 -m venv .venv


```bash
pip install ai-ml-emulation-layer-for-vulkan, cmake
```

To verify your installation, run the following commands:

```bash
Expand All @@ -38,33 +53,31 @@ Each command should print the installed version of the tool.
Go to the [Getting Started with the Windows Vulkan SDK](https://vulkan.lunarg.com/sdk/home) and download the SDK Installer for Windows. This installs **Vulkan Configurator** which is used to run the emulation layers.

{{% notice Note %}}
You must use a version >= 1.4.321 for the Vulkan SDK.
{{% /notice %}}

## Download the emulation layers

For this Learning Path, a pre-built of package of the emulation layers is available. Download them by clicking the link.
You must use a version >= 1.4.321 for the Vulkan SDK.

[ML Emulation Layer for Vulkan](https://www.arm.com/-/media/Files/developer/MLEmulationLayerForVulkan20251107)
{{% /notice %}}

Extract the downloaded file in a location of your choice. You’re now ready to enable the emulation layers in Vulkan Configurator.

## Enable the emulation layers in Vulkan Configurator

Next, enable the emulation layers using the Vulkan Configurator to simulate the `VK_ARM_data_graph` and `VK_ARM_tensors` extensions. Open **Vulkan Configurator**.

Under the **Vulkan Layers Location** tab, add the path to your `MLEmulationLayerForVulkan` folder.
Under the **Vulkan Layers Available** tab, add the path to your `Emulation layer` folder that can be found in the site packages of your venv folder select the bin folder.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What folder exactly? Be as specific as you can



Switch back to the **Vulkan Loader Management** tab. In the **Apply a Vulkan Loader Configuration** list, right-click and choose **Create a new Configuration**. You can give the new configuration any name, for example `tensor_and_data_graph`.
![VL available](images/vl-availble.png)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd blackout the rest of the path up until 'venv', so that the path on your local machine isn't exposed. You can keep the description of the image ("Screenshot of the Vulkan...")


![Screenshot of the Vulkan Configurator showing the Vulkan Layers Location tab, where the emulation layer path (MLEmulationLayerForVulkan) is added to enable VK_ARM_data_graph and VK_ARM_tensors alt-text#center](./images/load_layers.png "Add emulation layers in Vulkan Configurator")
Under the **Vulkan layers Configuration** tabgo through each setting in the top rigt except disable all Vulkan Layers and enable the Graph and Tensor Emulation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Make an agent pass of this update to catch little spelling mistakes like this one


Ensure that the **Graph** layer is listed above the **Tensor** layer.

![Screenshot showing the Graph layer listed above the Tensor layer in the Vulkan Configurator. alt-text#center](./images/verify_layers.png "Reorder layers in Vulkan Configurator")
![VL Config](images/vl-config.png)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there an option here to leave out the other layers? Try clicking the dropdown "Show all available layers". This'll make it easier for the reader to spot what they are looking for in their own setup

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I haven't found that option myself in the configurator. Will have another pass


{{% notice Important %}}

Keep Vulkan Configurator running while you run the Vulkan samples.

{{% /notice %}}

With the emulation layers configured, you're ready to build the Vulkan Samples. Continue to the next section to get started.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ cd Vulkan-Samples

This repository includes the framework and samples showcasing the ML extensions for Vulkan.

## Setting up Visual studio build tools

o build the Vulkan Samples on Windows using the Visual Studio generator, you still need the Microsoft C++ compiler and build tools.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The "Desktop development with C++" is listed as a prerequisite to the Learning Path itself, is this the same thing you're describing here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Alright, in that case this part can be omitted :)


Install the Visual Studio 2022 Build Tools with:

```bash
winget install -e --id Microsoft.VisualStudio.2022.BuildTools
```

When the installer opens, select:

Desktop development with C++

![image for the desktop tool required visual studio](images/vsmod.png)

Make sure these components are included:

MSVC v143 C++ build tools
Windows 10/11 SDK
C++ CMake tools for Windows


## Build the Vulkan Samples

You're now ready to compile the project. From the root of the repository:
Expand Down Expand Up @@ -65,4 +88,4 @@ As a next step, you can explore the remaining samples for the data graph pipelin
| **Tensor Image Aliasing** | Demonstrates tensor aliasing with Vulkan images to enable zero-copy workflows | Memory-efficient data sharing |
| **Postprocessing with VGF** | Explores using VGF format, which contains SPIR-V, input, output and constant data used to run a data graph pipeline. | Neural network model |

Next, you'll review additional tools to help you work with ML extensions for Vulkan in your own development environment.
Next, you'll review additional tools to help you work with ML extensions for Vulkan in your own development environment.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ learning_objectives:

prerequisites:
- Windows 11 development machine
- Visual Studio 2022
- Visual Studio 2022 and VSCode
- Visual Studio workload - Desktop development with C++
- Visual Studio workload - .NET desktop build tools

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading