From b2d8aff806cc4966921621a34cb072ad3ed98e86 Mon Sep 17 00:00:00 2001 From: luxuhui Date: Mon, 11 Nov 2019 15:41:14 +0800 Subject: [PATCH] fix bug: cl on Mi Note3, dana, ci script N/A Signed-off-by: Luxuhui --- .gitlab-ci.yml | 7 ------- mace/ops/opencl/cl/lpnorm.cl | 5 ++--- mace/ops/opencl/cl/mvnorm.cl | 10 +++++----- tools/dana/dana_cli.py | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b685433a..52cb2a3f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,13 +60,6 @@ bazel_build: only: - triggers -cmake_build: - stage: build - script: - - sh tools/cmake-build-standalone-lib.sh - only: - - triggers - build_android_demo: stage: build script: diff --git a/mace/ops/opencl/cl/lpnorm.cl b/mace/ops/opencl/cl/lpnorm.cl index a2dbbc9d..16a07f56 100644 --- a/mace/ops/opencl/cl/lpnorm.cl +++ b/mace/ops/opencl/cl/lpnorm.cl @@ -65,12 +65,11 @@ __kernel void lpnorm(OUT_OF_RANGE_PARAMS const int chan_blks = global_size_dim0; const int width = global_size_dim1; - const int hb = global_size_dim2; + const int pos = mad24(chan_blk_idx, width, width_idx); + DATA_TYPE4 in_data = READ_IMAGET(input, SAMPLER, (int2)(pos, hb_idx)); const int hb_base = mul24(hb_idx / height, height); DATA_TYPE4 total = compute_total(input, hb_base, chan_blks, width, height, hb_idx, chan_blk_idx); - const int pos = mad24(chan_blk_idx, width, width_idx); - DATA_TYPE4 in_data = READ_IMAGET(input, SAMPLER, (int2)(pos, hb_idx)); #if PARAM_P == 1 in_data = in_data / (total + eps); diff --git a/mace/ops/opencl/cl/mvnorm.cl b/mace/ops/opencl/cl/mvnorm.cl index d9e6ae5b..850b1958 100644 --- a/mace/ops/opencl/cl/mvnorm.cl +++ b/mace/ops/opencl/cl/mvnorm.cl @@ -51,12 +51,12 @@ __kernel void mvnorm_mean(OUT_OF_RANGE_PARAMS const int chan_blks = global_size_dim0; const int width = global_size_dim1; - DATA_TYPE4 mean = compute_mean_image(input, width_idx, - hb_idx, chan_blks, height, width); const int pos = mad24(chan_blk_idx, width, width_idx); DATA_TYPE4 in_data = READ_IMAGET(input, SAMPLER, (int2)(pos, hb_idx)); - in_data -= mean; + DATA_TYPE4 mean = compute_mean_image(input, width_idx, + hb_idx, chan_blks, height, width); + in_data -= mean; WRITE_IMAGET(output, (int2)(pos, hb_idx), in_data); } @@ -80,10 +80,10 @@ __kernel void mvnorm_vn_step1(OUT_OF_RANGE_PARAMS const int chan_blks = global_size_dim0; const int width = global_size_dim1; - DATA_TYPE4 mean = compute_mean_image(input, width_idx, - hb_idx, chan_blks, height, width); const int pos = mad24(chan_blk_idx, width, width_idx); DATA_TYPE4 in_data = READ_IMAGET(input, SAMPLER, (int2)(pos, hb_idx)); + DATA_TYPE4 mean = compute_mean_image(input, width_idx, + hb_idx, chan_blks, height, width); in_data = in_data - mean; DATA_TYPE4 pow_data = in_data * in_data; if (hb_idx == 0 && width_idx == 0) { diff --git a/tools/dana/dana_cli.py b/tools/dana/dana_cli.py index 84a96015..e2ab308b 100644 --- a/tools/dana/dana_cli.py +++ b/tools/dana/dana_cli.py @@ -179,7 +179,7 @@ class DanaCli: except Exception as e: print("Http error, url=%s\npost_data=%s\n%s" % (request_url, json_data, e)) - exit(1) + return False result = response.decode() if len(result) < 30 and "successfull" in result: return True -- GitLab