From 8a4932efd736769a7c1bfb16258889156b4f5578 Mon Sep 17 00:00:00 2001 From: greatpanc Date: Mon, 14 Mar 2022 15:28:54 +0800 Subject: [PATCH] add opencl download ways --- cmake/external_libs/opencl.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/external_libs/opencl.cmake b/cmake/external_libs/opencl.cmake index 99a6af4f0db..35e72632615 100644 --- a/cmake/external_libs/opencl.cmake +++ b/cmake/external_libs/opencl.cmake @@ -1,4 +1,16 @@ -if(ENABLE_GITEE) +if(ENABLE_GITEE_EULER) + set(GIT_REPOSITORY "git@gitee.com:src-openeuler/opencl-clhpp.git") + set(GIT_TAG "7347fa1bb52ebee9f3d6c44ff65ef3c4253cab79") + set(MD5 "d41d8cd98f00b204e9800998ecf8427e") + + __download_pkg_with_git(OpenCL-CLHPP ${GIT_REPOSITORY} ${GIT_TAG} ${MD5}) + set(OPENCL_CLHPP_SRC "${TOP_DIR}/mindspore/lite/build/_deps/opencl-clhpp-src") + execute_process(COMMAND tar -xf ${OPENCL_CLHPP_SRC}/v2.0.12.tar.gz --strip-components 1 -C ${OPENCL_CLHPP_SRC}) + + set(OPENCL_HEADER_SRC "${TOP_DIR}/mindspore/lite/build/_deps/opencl-headers-src") + execute_process(COMMAND mkdir -p ${OPENCL_HEADER_SRC}) + execute_process(COMMAND tar -xf ${OPENCL_CLHPP_SRC}/v2020.12.18.tar.gz --strip-components 1 -C ${OPENCL_HEADER_SRC}) +elseif(ENABLE_GITEE) set(REQ_URL "https://gitee.com/mirrors/OpenCL-Headers/repository/archive/v2020.12.18.tar.gz") set(MD5 "9a34e50198ac54b795bf3822bb6e429a") __download_pkg(OpenCL-Headers ${REQ_URL} ${MD5})