CMake error during PyTorch Mobile custom build

Hi everyone,
I was facing the same issue some days ago with NDK 23, PyTorch 1.12.0 and the following might help. As I could read in the NDK changelog:

Vulkan tools source is also removed, specifically vulkan_wrapper. It should be downloaded upstream from GitHub.

it is required to manually place the common folder from the Vulkan-Tools repository (v1.2.137 worked for me) into the Android NDK Vulkan folder (NDK/sources/third_party/vulkan). If you use libtorch on mobile it might be necessary to copy two missing source files: pytorchdir/aten/src/ATen/native/PadNd.* → compiled_abi_dir/include/ATen/native/ to build an app that uses libtorch.

2 Likes