!27664 [MSLITE][GPU] opencl cmake download bugfix

Merge pull request !27664 from Greatpan/br_bugfix
This commit is contained in:
i-robot 2021-12-15 03:33:15 +00:00 committed by Gitee
commit 4ae133265e
2 changed files with 5 additions and 7 deletions

View File

@ -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")

View File

@ -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();