# Executorch Vulkan delegate on embedded Linux

**URL:** <https://discuss.pytorch.org/t/executorch-vulkan-delegate-on-embedded-linux/214282>\
**Category:** ExecuTorch\
**Created:** [December 16, 2024, 4:31pm UTC](https://discuss.pytorch.org/t/executorch-vulkan-delegate-on-embedded-linux/214282 "2024-12-16T16:31:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_G\_Gener](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alex_g_gener/32/74542_2.png) [@Alex\_G\_Gener](https://discuss.pytorch.org/u/Alex_G_Gener)\
**Post date:** [December 16, 2024, 4:31pm UTC](https://discuss.pytorch.org/t/executorch-vulkan-delegate-on-embedded-linux/214282/1 "2024-12-16T16:31:34Z")

</div>

Hello. I’m using a embedded linux platform and want to deploy pytorch models on the ARM MALI GPU. I’m setting the Vulkan delegate but having problems when building the runner with Vulkan. All tutorials I’ve found are related to Android development and Vulkan linking of libraries is done automatically with the Android NDK, but I’m not able to link the CMAKE to my GLSL compiler. I have glslangValidator installed instead of glslc.

Is that supported? Are there any other limitations we should consider when using the Vulkan delegate out of Android?

Thanks in advance,  
Alex.

---

<div class="post-metadata">

**Author:** ![kimishpatel](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/kimishpatel/32/39320_2.png) [@kimishpatel](https://discuss.pytorch.org/u/kimishpatel)\
**Post date:** [January 3, 2025, 6:33pm UTC](https://discuss.pytorch.org/t/executorch-vulkan-delegate-on-embedded-linux/214282/2 "2025-01-03T18:33:39Z")

</div>

@ssjia can you answer this one?

---

<div class="post-metadata">

**Author:** ![ssjia](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ssjia/32/57069_2.png) [@ssjia](https://discuss.pytorch.org/u/ssjia)\
**Post date:** [January 9, 2025, 4:24pm UTC](https://discuss.pytorch.org/t/executorch-vulkan-delegate-on-embedded-linux/214282/3 "2025-01-09T16:24:19Z")

</div>

Hello @Alex_G_Gener, thanks for your interest in the Vulkan delegate and apologies for the super late reply. Anecdotally, I am able to compile and execute the Vulkan delegate on a Linux platform. You can try the same with the following commands

```bash
cd <executorch_root>

# Clean repo
./install_requirements.sh --clean
git submodule sync
git submodule update --init

# Install requirements
./install_requirements.sh --pybind

# Build ExecuTorch libs with Vulkan
(rm -rf cmake-out && \
  cmake . \
  -DCMAKE_INSTALL_PREFIX=cmake-out \
  -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
  -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
  -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
  -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
  -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
  -DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
  -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
  -DEXECUTORCH_BUILD_TESTS=ON \
  -DEXECUTORCH_BUILD_VULKAN=ON \
  -Bcmake-out && \
  cmake --build cmake-out -j64 --target install)

# Build Vulkan test binary
(rm -rf cmake-out/backends/vulkan/test && \
  cmake backends/vulkan/test \
    -DCMAKE_INSTALL_PREFIX=cmake-out \
    -DPYTHON_EXECUTABLE=python \
    -Bcmake-out/backends/vulkan/test && \
  cmake --build cmake-out/backends/vulkan/test -j16)

# Execute test binary
cmake-out/backends/vulkan/test/vulkan_compute_api_test --gtest_filter="*"

```

As for `glslc` vs `glslangValidator`, there is currently an assumption that `glslc` is the shader compiler of choice since that is what’s included in the Android NDK. However, it should be easy to add a build configuration to specify that `glslangValidator` should be used instead.
