未验证 提交 70719c56 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1057 from codeWorm2015/opencl

modified build.sh
...@@ -54,7 +54,7 @@ class CLScope { ...@@ -54,7 +54,7 @@ class CLScope {
} }
auto program = auto program =
CLEngine::Instance()->CreateProgramWith(context_.get(), file_name); CLEngine::Instance()->CreateProgramWith(context_.get(), "./cl_kernel/" + file_name);
programs_[file_name] = std::move(program); programs_[file_name] = std::move(program);
status_ = clBuildProgram(program.get(), 0, 0, 0, 0, 0); status_ = clBuildProgram(program.get(), 0, 0, 0, 0, 0);
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once; #pragma once;
/* #pragma OPENCL EXTENSION cl_khr_fp16 : enable
inline hafl4 activation(half4 in inline hafl4 activation(half4 in
#ifdef PRELU #ifdef PRELU
...@@ -32,4 +32,3 @@ inline hafl4 activation(half4 in ...@@ -32,4 +32,3 @@ inline hafl4 activation(half4 in
return output; return output;
} }
*/
...@@ -23,9 +23,7 @@ conv_add_bn_relu ...@@ -23,9 +23,7 @@ conv_add_bn_relu
*/ */
/* #include "cl_common.h"
#include "common.h"
__kernel void conv_1x1(__private const int global_size_dim0, __kernel void conv_1x1(__private const int global_size_dim0,
__private const int global_size_dim1, __private const int global_size_dim1,
...@@ -305,5 +303,3 @@ __kernel void depth_conv_3x3(__private const int global_size_dim0, ...@@ -305,5 +303,3 @@ __kernel void depth_conv_3x3(__private const int global_size_dim0,
int2 output_pos(out_c * global_size_dim1 + out_w, out_nh); int2 output_pos(out_c * global_size_dim1 + out_w, out_nh);
write_imageh(output_image, output_pos, output); write_imageh(output_image, output_pos, output);
} }
*/
...@@ -90,6 +90,8 @@ build_for_android() { ...@@ -90,6 +90,8 @@ build_for_android() {
fi fi
cd "../build/release/${PLATFORM}" cd "../build/release/${PLATFORM}"
make -j 8 make -j 8
mkdir ./build/cl_kernel
cp ../../../src/operators/kernel/cl/cl_kernel/* ./build/cl_kernel/
} }
build_for_ios() { build_for_ios() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册