From 74bd6c58f9dd05b46c11d0a6a36e362512260009 Mon Sep 17 00:00:00 2001 From: Janet Schneider Date: Tue, 6 Dec 2022 07:49:30 -0800 Subject: [PATCH 1/2] Workaround for AOT module shutdown --- python/tvm/contrib/hexagon/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/contrib/hexagon/session.py b/python/tvm/contrib/hexagon/session.py index 466103f6e2c9..ad0a39bfb0d1 100644 --- a/python/tvm/contrib/hexagon/session.py +++ b/python/tvm/contrib/hexagon/session.py @@ -248,8 +248,8 @@ def get_aot_executor( GraphModule : Runtime graph module that can be used to execute the graph. """ - aot_mod = self.load_module(module_file) - return tvm.runtime.executor.AotModule(aot_mod["default"](self.device)) + self.aot_mod = self.load_module(module_file) + return tvm.runtime.executor.AotModule(self.aot_mod["default"](self.device)) def get_graph_debug_executor( self, From 576691574aaa57b189f8b1a0502df56aaeee70a6 Mon Sep 17 00:00:00 2001 From: Janet Schneider Date: Mon, 9 Jan 2023 17:31:13 -0800 Subject: [PATCH 2/2] PR feedback - add issue and comment --- python/tvm/contrib/hexagon/session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/tvm/contrib/hexagon/session.py b/python/tvm/contrib/hexagon/session.py index ad0a39bfb0d1..506f1d968d70 100644 --- a/python/tvm/contrib/hexagon/session.py +++ b/python/tvm/contrib/hexagon/session.py @@ -248,6 +248,7 @@ def get_aot_executor( GraphModule : Runtime graph module that can be used to execute the graph. """ + # Temporary workaround for https://github.com/apache/tvm/issues/13741 self.aot_mod = self.load_module(module_file) return tvm.runtime.executor.AotModule(self.aot_mod["default"](self.device))