From 766bbf989dc52470a2cd3b594683d2dcc4b25018 Mon Sep 17 00:00:00 2001 From: liuqi Date: Thu, 1 Feb 2018 15:53:32 +0800 Subject: [PATCH] use .pic.a for local runtime. --- mace/kernels/opencl/buffer_to_image.cc | 1 - tools/export_lib.sh | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mace/kernels/opencl/buffer_to_image.cc b/mace/kernels/opencl/buffer_to_image.cc index 98035498..9fa26448 100644 --- a/mace/kernels/opencl/buffer_to_image.cc +++ b/mace/kernels/opencl/buffer_to_image.cc @@ -87,7 +87,6 @@ void BufferToImageFunctor::operator()(Tensor *buffer, } b2f_kernel.setArg(idx++, *(static_cast(image->buffer()))); - const uint32_t kwg_size = runtime->GetKernelMaxWorkGroupSize(b2f_kernel); const std::vector lws = {16, 64}; cl::Event event; cl_int error = runtime->command_queue().enqueueNDRangeKernel( diff --git a/tools/export_lib.sh b/tools/export_lib.sh index 06c795f8..458e44a2 100755 --- a/tools/export_lib.sh +++ b/tools/export_lib.sh @@ -94,10 +94,18 @@ merge_libs() lib_dir=${lib_dir#//} lib_name_prefix=lib`echo ${lib_target} | cut -d: -f2` bin_path="${MACE_SOURCE_DIR}/bazel-bin/${lib_dir}/${lib_name_prefix}" - if [ -f "${bin_path}.a" ]; then - bin_path="${bin_path}.a" + if [ x"${RUNTIME}" = x"local" ]; then + if [ -f "${bin_path}.pic.a" ]; then + bin_path="${bin_path}.pic.a" + else + bin_path="${bin_path}.pic.lo" + fi else - bin_path="${bin_path}.lo" + if [ -f "${bin_path}.a" ]; then + bin_path="${bin_path}.a" + else + bin_path="${bin_path}.lo" + fi fi echo "addlib ${bin_path}" >> ${LIBMACE_TEMP_DIR}/${CREATE_LIB_NAME}.mri || exit -1 done -- GitLab