diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/2-ml-ext-for-vulkan.md b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/2-ml-ext-for-vulkan.md index b5cb34af04..8ad672d939 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/2-ml-ext-for-vulkan.md +++ b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/2-ml-ext-for-vulkan.md @@ -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 + +```bash +pip install ai-ml-emulation-layer-for-vulkan, cmake +``` + To verify your installation, run the following commands: ```bash @@ -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. + -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) -![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 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) {{% 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. diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/3-first-sample.md b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/3-first-sample.md index a2987de7b8..6767f0684e 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/3-first-sample.md +++ b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/3-first-sample.md @@ -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. + +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: @@ -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. \ No newline at end of file +Next, you'll review additional tools to help you work with ML extensions for Vulkan in your own development environment. diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/_index.md b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/_index.md index d26f7d5ac8..f57c24c460 100644 --- a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/_index.md +++ b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/_index.md @@ -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 diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/c-ext.png b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/c-ext.png new file mode 100644 index 0000000000..f5fa8b8eb8 Binary files /dev/null and b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/c-ext.png differ diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/cmake-ext.png b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/cmake-ext.png new file mode 100644 index 0000000000..9b8b7021fc Binary files /dev/null and b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/cmake-ext.png differ diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-availble.png b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-availble.png new file mode 100644 index 0000000000..2d356252f5 Binary files /dev/null and b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-availble.png differ diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-config.png b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-config.png new file mode 100644 index 0000000000..fc69a5574a Binary files /dev/null and b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vl-config.png differ diff --git a/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vsmod.png b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vsmod.png new file mode 100644 index 0000000000..b2f537c3ba Binary files /dev/null and b/content/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/images/vsmod.png differ