diff --git a/src/framework/cl/cl_scope.h b/src/framework/cl/cl_scope.h index 15ca27fd7c7929aa216e7bbef73e2555028285b8..61082808b53b9edc821daca5c310c8bb4c3b4f98 100644 --- a/src/framework/cl/cl_scope.h +++ b/src/framework/cl/cl_scope.h @@ -54,7 +54,7 @@ class CLScope { } auto program = - CLEngine::Instance()->CreateProgramWith(context_.get(), file_name); + CLEngine::Instance()->CreateProgramWith(context_.get(), "./cl_kernel/" + file_name); programs_[file_name] = std::move(program); status_ = clBuildProgram(program.get(), 0, 0, 0, 0, 0); diff --git a/src/operators/kernel/cl/cl_kernel/common.h b/src/operators/kernel/cl/cl_kernel/cl_common.h similarity index 94% rename from src/operators/kernel/cl/cl_kernel/common.h rename to src/operators/kernel/cl/cl_kernel/cl_common.h index 027255d9dc01ad8f6da6e23842a80c029f2698ee..c71967ccd66e26e2afb796e7e6a2cb550f80bb40 100644 --- a/src/operators/kernel/cl/cl_kernel/common.h +++ b/src/operators/kernel/cl/cl_kernel/cl_common.h @@ -14,7 +14,7 @@ limitations under the License. */ #pragma once; -/* +#pragma OPENCL EXTENSION cl_khr_fp16 : enable inline hafl4 activation(half4 in #ifdef PRELU @@ -32,4 +32,3 @@ inline hafl4 activation(half4 in return output; } -*/ diff --git a/src/operators/kernel/cl/cl_kernel/conv_kernel.inc.cl b/src/operators/kernel/cl/cl_kernel/conv_kernel.inc.cl index 04ceed8a6e16378f87966e53dff2bc880d3141d6..c0264fefdc0cff0a449d62b5ad8dc581fe1d4600 100644 --- a/src/operators/kernel/cl/cl_kernel/conv_kernel.inc.cl +++ b/src/operators/kernel/cl/cl_kernel/conv_kernel.inc.cl @@ -23,9 +23,7 @@ conv_add_bn_relu */ -/* - -#include "common.h" +#include "cl_common.h" __kernel void conv_1x1(__private const int global_size_dim0, __private const int global_size_dim1, @@ -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); write_imageh(output_image, output_pos, output); } - -*/ diff --git a/tools/build.sh b/tools/build.sh index baa9fe1097b774418899cb20f2f1e63520fa7792..42ea9497a6443d148db58f821d4c30bffdca075a 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -90,6 +90,8 @@ build_for_android() { fi cd "../build/release/${PLATFORM}" make -j 8 + mkdir ./build/cl_kernel + cp ../../../src/operators/kernel/cl/cl_kernel/* ./build/cl_kernel/ } build_for_ios() {