Skip to content

Commit

Permalink
more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed May 7, 2023
1 parent d70c2eb commit daaff73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/OpenCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ endif(USE_AOCL)

if(USE_OPENCL)
tvm_file_glob(GLOB RUNTIME_OPENCL_SRCS src/runtime/opencl/*.cc)
list(APPEND COMPILER_SRCS src/target/spirv/spirv_utils.cc)
list(APPEND COMPILER_SRCS src/target/spirv/spirv_utils.cc)

if(${USE_OPENCL} MATCHES ${IS_TRUE_PATTERN})
message(STATUS "Enabled runtime search for OpenCL library location")
Expand Down
3 changes: 2 additions & 1 deletion src/target/source/codegen_opencl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,13 @@ void CodeGenOpenCL::SetTextureScope(
}

runtime::Module BuildOpenCL(IRModule mod, Target target) {
#if TVM_USE_VULKAN
Optional<String> device = target->GetAttr<String>("device");

if (device && device.value() == "spirv") {
auto [smap, spirv_text] = LowerToSPIRV(mod, target);
return runtime::OpenCLModuleCreate(smap, spirv_text, ExtractFuncInfo(mod));
}
#endif

using tvm::runtime::Registry;
bool output_ssa = false;
Expand Down

0 comments on commit daaff73

Please sign in to comment.