Skip to content

Commit

Permalink
Check common subdirs for vulkan/spirv headers (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
doctaweeks authored and tqchen committed Jun 19, 2018
1 parent 9bc96f5 commit 90ecefd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions cmake/util/FindVulkan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,10 @@ macro(find_vulkan use_vulkan)
get_filename_component(VULKAN_LIBRARY_PATH ${Vulkan_LIBRARY} DIRECTORY)
find_library(Vulkan_SPIRV_TOOLS_LIBRARY SPIRV-Tools
${VULKAN_LIBRARY_PATH}/spirv-tools)

find_path(_libspirv libspirv.h HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv-tools)
find_path(_spirv spirv.hpp HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv/unified1)
find_path(_glsl_std GLSL.std.450.h HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv/unified1)
list(APPEND Vulkan_INCLUDE_DIRS ${_libspirv} ${_spirv} ${_glsl_std})
endif(Vulkan_FOUND)
endmacro(find_vulkan)
2 changes: 1 addition & 1 deletion src/codegen/spirv/build_vulkan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Build SPIRV block
*/
// Use libspirv for parsing and validating code.
#include <vulkan/libspirv.h>
#include <libspirv.h>
#include <dmlc/memory_io.h>
#include <tvm/ir_pass.h>

Expand Down
2 changes: 1 addition & 1 deletion src/codegen/spirv/intrin_rule_spirv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include <tvm/packed_func_ext.h>
#include <tvm/ir.h>
#include <vulkan/GLSL.std.450.h>
#include <GLSL.std.450.h>

namespace tvm {
namespace codegen {
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/spirv/ir_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string>
#include <map>

#include <vulkan/spirv.hpp>
#include <spirv.hpp>

namespace tvm {
namespace codegen {
Expand Down

0 comments on commit 90ecefd

Please sign in to comment.