From 098b647ea38317ef1608d6b167eff0cf247a4f05 Mon Sep 17 00:00:00 2001 From: greatpanc Date: Tue, 14 Dec 2021 16:48:37 +0800 Subject: [PATCH] opencl cmake download bugfix --- cmake/external_libs/opencl.cmake | 6 ++---- mindspore/lite/src/runtime/kernel/opencl/opencl_subgraph.cc | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmake/external_libs/opencl.cmake b/cmake/external_libs/opencl.cmake index c367f481a73..99a6af4f0db 100644 --- a/cmake/external_libs/opencl.cmake +++ b/cmake/external_libs/opencl.cmake @@ -1,12 +1,10 @@ if(ENABLE_GITEE) set(REQ_URL "https://gitee.com/mirrors/OpenCL-Headers/repository/archive/v2020.12.18.tar.gz") set(MD5 "9a34e50198ac54b795bf3822bb6e429a") - set(PKG_GIT_TAG "") - __download_pkg_with_git(OpenCL-Headers ${REQ_URL} ${PKG_GIT_TAG} ${MD5}) + __download_pkg(OpenCL-Headers ${REQ_URL} ${MD5}) set(REQ_URL "https://gitee.com/mirrors/OpenCL-CLHPP/repository/archive/v2.0.12.tar.gz") set(MD5 "3439d8eb6d247bfd02164bcd0c8e5adb") - set(PKG_GIT_TAG "") - __download_pkg_with_git(OpenCL-CLHPP ${REQ_URL} ${PKG_GIT_TAG} ${MD5}) + __download_pkg(OpenCL-CLHPP ${REQ_URL} ${MD5}) else() set(REQ_URL "https://github.com/KhronosGroup/OpenCL-Headers/archive/v2020.12.18.tar.gz") set(MD5 "ea0296fb79951f43082b742234f26c9a") diff --git a/mindspore/lite/src/runtime/kernel/opencl/opencl_subgraph.cc b/mindspore/lite/src/runtime/kernel/opencl/opencl_subgraph.cc index f927f6fa8bc..961c7feda94 100644 --- a/mindspore/lite/src/runtime/kernel/opencl/opencl_subgraph.cc +++ b/mindspore/lite/src/runtime/kernel/opencl/opencl_subgraph.cc @@ -308,9 +308,9 @@ int OpenCLSubGraph::InsertOpsPass() { int OpenCLSubGraph::RunPass() { // The fp16 operator in heterogeneous scenes needs to be set to fp32 // to prevent the frame from being converted to fp16 in advance. - auto in_frist_tensor = in_tensors().front(); - if (in_frist_tensor->IsGraphInput() && - (in_frist_tensor->data_type() == kNumberTypeFloat32 || in_frist_tensor->data_type() == kNumberTypeFloat16)) { + auto in_first_tensor = in_tensors().front(); + if (in_first_tensor->IsGraphInput() && + (in_first_tensor->data_type() == kNumberTypeFloat32 || in_first_tensor->data_type() == kNumberTypeFloat16)) { desc_.data_type = in_tensors()[0]->data_type(); } allocator_ = ocl_runtime_->GetAllocator();