Build TVM with Vulkan, occur "cannot find Vulkan_SPIRV_TOOLS_LIBRARY" error


#1

I want to build TVM with vulkan. I set USE_VULKAN with the vulkan latest version 1.1.101.0. cmake can find the include and libs, but it occurs error like followings:

-- Vulkan_SPIRV_TOOLS_LIBRARY=Vulkan_SPIRV_TOOLS_LIBRARY-NOTFOUND
-- Build with VULKAN support
-- Link with dynamic LLVM library
-- Found LLVM_INCLUDE_DIRS=/usr/lib/llvm-6.0/include
-- Found LLVM_DEFINITIONS=-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-- Found TVM_LLVM_VERSION=60
-- Build with LLVM 6.0.0
-- Set TVM_LLVM_VERSION=60
-- Build with contrib.sort
-- Build with contrib.hybriddump
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Vulkan_SPIRV_TOOLS_LIBRARY
    linked by target "tvm" in directory /home/rivergold/software/lib/tvm/tvm
    linked by target "tvm_topi" in directory /home/rivergold/software/lib/tvm/tvm

It is my first time build TVM with vulkan, is there anythings else I need to install for vulkan to build TVM? If I need to build SPIRV-Tools with vulkan and link it to TVM?


#2

Hi @rivergold
I think that the following Dockerfile will be helpful.
Do you set the environment variable VULKAN_SDK ?