echuraev commented on code in PR #13362:
URL: https://github.com/apache/tvm/pull/13362#discussion_r1022057781


##########
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:
   This wrapper can cover all cases. I kept this search only for case which I 
have described in the comment to your question about OpenCL SDK. Actually, 
probably we can remove search of OpenCL and use wrapper in all cases. I didn't 
do it only because the user might want to specify a specific version of OpenCL 
or OpenCL SDK and I think we should give him/her this opportunity.



-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to