From: Neo Chien Date: Wed, 6 Nov 2019 18:39:40 +0000 (+0800) Subject: [Contrib] Fix error message at callback_get_section_size() (#4221) X-Git-Tag: upstream/0.7.0~1688 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddaa9530874fbaef2a2d7ce6c642013653597338;p=platform%2Fupstream%2Ftvm.git [Contrib] Fix error message at callback_get_section_size() (#4221) * [Contrib] Fix error message at callback_get_section_size() * Trigger notification --- 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):