From a87395ee5baa5c06c9ff4c9630be0706a8ff344f Mon Sep 17 00:00:00 2001 From: Liangliang He Date: Thu, 11 Jan 2018 16:43:11 +0800 Subject: [PATCH] minor fix --- mace/core/runtime/opencl/opencl_runtime.cc | 4 ++-- mace/python/tools/binary_codegen.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mace/core/runtime/opencl/opencl_runtime.cc b/mace/core/runtime/opencl/opencl_runtime.cc index 065dc865..90387f31 100644 --- a/mace/core/runtime/opencl/opencl_runtime.cc +++ b/mace/core/runtime/opencl/opencl_runtime.cc @@ -158,7 +158,7 @@ void OpenCLRuntime::BuildProgram(const std::string &program_name, program, &is_opencl_binary); MACE_CHECK(found, "Program not found for ", - is_opencl_binary ? "source: " : "binary: ", + is_opencl_binary ? "binary: " : "source: ", built_program_key); // Build program @@ -174,7 +174,7 @@ void OpenCLRuntime::BuildProgram(const std::string &program_name, LOG(INFO) << "Program build log: " << build_log; } LOG(FATAL) << "Build program from " - << (is_opencl_binary ? "source: " : "binary: ") + << (is_opencl_binary ? "binary: " : "source: ") << built_program_key << " failed: " << ret; } diff --git a/mace/python/tools/binary_codegen.py b/mace/python/tools/binary_codegen.py index 9a593fe3..a7cd756b 100644 --- a/mace/python/tools/binary_codegen.py +++ b/mace/python/tools/binary_codegen.py @@ -34,7 +34,6 @@ def generate_cpp_source(): key_size, = struct.unpack("i", binary_array[idx:idx+4]) idx += 4 key, = struct.unpack(str(key_size) + "s", binary_array[idx:idx+key_size]) - key = ''.join([ "\\%03o" % ord(c) if not c.isalnum() else c for c in key]) idx += key_size params_size, = struct.unpack("i", binary_array[idx:idx+4]) idx += 4 -- GitLab