From b0bd8b011c099858190712e90d6283a36889fff5 Mon Sep 17 00:00:00 2001 From: liuqi Date: Wed, 1 Aug 2018 17:51:21 +0800 Subject: [PATCH] Add Mace version to identify OpenCL cache for not use old cache. --- docs/development/memory_layout.rst | 4 ++-- mace/core/runtime/opencl/opencl_runtime.cc | 3 ++- mace/python/tools/model_header.jinja2 | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/development/memory_layout.rst b/docs/development/memory_layout.rst index 186da713..81e4db43 100644 --- a/docs/development/memory_layout.rst +++ b/docs/development/memory_layout.rst @@ -50,11 +50,11 @@ The Input/Output Tensor is stored in NHWC format: * - Height-Major Input/Output - NHWC - [W * C, N * (H+3)/4] - - Winograd Convolution format + - WinogradTransform and MatMul output format * - Width-Major Input/Output - NHWC - [(W+3)/4 * C, N * H] - - Winograd Convolution format + - Unused now Each Pixel of **Image** contains 4 elements. The below table list the coordination relation between **Image** and **Buffer**. diff --git a/mace/core/runtime/opencl/opencl_runtime.cc b/mace/core/runtime/opencl/opencl_runtime.cc index f901973f..30533703 100644 --- a/mace/core/runtime/opencl/opencl_runtime.cc +++ b/mace/core/runtime/opencl/opencl_runtime.cc @@ -321,7 +321,8 @@ OpenCLRuntime::OpenCLRuntime(): std::stringstream ss; ss << default_platform.getInfo() << ", " << default_platform.getInfo() << ", " - << default_platform.getInfo(); + << default_platform.getInfo() << ", " + << MaceVersion(); platform_info_ = ss.str(); VLOG(1) << "Using platform: " << platform_info_; diff --git a/mace/python/tools/model_header.jinja2 b/mace/python/tools/model_header.jinja2 index 28b1b545..c90c4f08 100644 --- a/mace/python/tools/model_header.jinja2 +++ b/mace/python/tools/model_header.jinja2 @@ -27,8 +27,6 @@ namespace {{tag}} { const unsigned char *LoadModelData(const std::string &model_data_file); -void UnloadModelData(const unsigned char *model_data); - const std::shared_ptr CreateNet(); const std::string ModelName(); -- GitLab