From ddaa9530874fbaef2a2d7ce6c642013653597338 Mon Sep 17 00:00:00 2001 From: Neo Chien Date: Thu, 7 Nov 2019 02:39:40 +0800 Subject: [PATCH] [Contrib] Fix error message at callback_get_section_size() (#4221) * [Contrib] Fix error message at callback_get_section_size() * Trigger notification --- python/tvm/contrib/binutil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tvm/contrib/binutil.py b/python/tvm/contrib/binutil.py index 1b8140c..a323272 100644 --- a/python/tvm/contrib/binutil.py +++ b/python/tvm/contrib/binutil.py @@ -22,6 +22,7 @@ from . import util from .._ffi.base import py_str from ..api import register_func + @register_func("tvm_callback_get_section_size") def tvm_callback_get_section_size(binary_path, section_name, toolchain_prefix): """Finds size of the section in the binary. @@ -53,7 +54,7 @@ def tvm_callback_get_section_size(binary_path, section_name, toolchain_prefix): size_output = size_output.decode("utf-8") if size_proc.returncode != 0: msg = "error in finding section size:\n" - msg += py_str(out) + msg += py_str(size_output) raise RuntimeError(msg) # TODO(weberlo): Refactor this method and `*relocate_binary` so they are @@ -93,6 +94,7 @@ def tvm_callback_get_section_size(binary_path, section_name, toolchain_prefix): return section_size + 32 return section_size + @register_func("tvm_callback_relocate_binary") def tvm_callback_relocate_binary( binary_path, text_addr, rodata_addr, data_addr, bss_addr, toolchain_prefix): -- 2.7.4