Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vulkan] Add device capabilities to Target, use in codegen #8127

Merged
merged 9 commits into from
May 26, 2021
21 changes: 0 additions & 21 deletions cmake/modules/Vulkan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
# Be compatible with older version of CMake
find_vulkan(${USE_VULKAN})

# Extra Vulkan runtime options, exposed for advanced users.
tvm_option(USE_VULKAN_IMMEDIATE_MODE "Use Vulkan Immediate mode
(KHR_push_descriptor extension)" ON IF USE_VULKAN)
tvm_option(USE_VULKAN_DEDICATED_ALLOCATION "Use Vulkan dedicated allocations" ON
IF USE_VULKAN)
tvm_option(USE_VULKAN_VALIDATION "Enable Vulkan API validation layers" OFF
IF USE_VULKAN)

if(USE_VULKAN)
if(NOT Vulkan_FOUND)
message(FATAL_ERROR "Cannot find Vulkan, USE_VULKAN=" ${USE_VULKAN})
Expand All @@ -38,17 +30,4 @@ if(USE_VULKAN)
list(APPEND COMPILER_SRCS ${COMPILER_VULKAN_SRCS})
list(APPEND TVM_LINKER_LIBS ${Vulkan_SPIRV_TOOLS_LIBRARY})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${Vulkan_LIBRARY})

if(USE_VULKAN_IMMEDIATE_MODE)
message(STATUS "Build with Vulkan immediate mode")
add_definitions(-DUSE_VULKAN_IMMEDIATE_MODE=1)
endif()
if(USE_VULKAN_DEDICATED_ALLOCATION)
message(STATUS "Build with Vulkan dedicated allocation")
add_definitions(-DUSE_VULKAN_DEDICATED_ALLOCATION=1)
endif()
if(USE_VULKAN_VALIDATION)
message(STATUS "Build with Vulkan API validation")
add_definitions(-DUSE_VULKAN_VALIDATION=1)
endif()
endif(USE_VULKAN)
2 changes: 1 addition & 1 deletion python/tvm/_ffi/runtime_ctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def api_version(self):
The version of the SDK

"""
return self._GetDeviceAttr(self.device_type, self.device_id, 12)
return self._GetDeviceAttr(self.device_type, self.device_id, 11)

@property
def driver_version(self):
Expand Down
Loading