elvin-n commented on code in PR #13362:
URL: https://github.com/apache/tvm/pull/13362#discussion_r1022832802
##########
cmake/modules/OpenCL.cmake:
##########
@@ -49,12 +49,17 @@ else()
endif(USE_AOCL)
if(USE_OPENCL)
- if (NOT OpenCL_FOUND)
- find_package(OpenCL REQUIRED)
- endif()
- message(STATUS "Build with OpenCL support")
tvm_file_glob(GLOB RUNTIME_OPENCL_SRCS src/runtime/opencl/*.cc)
- list(APPEND TVM_RUNTIME_LINKER_LIBS ${OpenCL_LIBRARIES})
+ if (OpenCL_FOUND)
+ message(STATUS "Build with OpenCL support")
Review Comment:
Eventually we decided to leave static OpenCL linking but change conditions
when it is selected and when wrapper should be selected. There might be cases
when dlopen is prohibited due to sandbox limitations and only libraries
statically selected by loader can be opened.
Modificatoin of USE_OPENCL logic:
if USE_OPENCL has ON, always use wrapper and dynamic loading of libOpenCL.so
in runtime
if USE_OPENCL points to openCL SDK, then use this sdk and static linking
without wrapper
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]