@@ -286,7 +286,9 @@ def get_graph_debug_executor(
286286 graph_json , graph_debug_mod , self .device , dump_root = str (dump_root )
287287 )
288288
289- def get_executor_from_factory (self , module : Union [ExecutorFactoryModule , relax .Executable ]):
289+ def get_executor_from_factory (
290+ self , module : Union [ExecutorFactoryModule , relax .Executable ], hexagon_arch : str = "v68"
291+ ):
290292 """Create a local GraphModule which consumes a remote libmod.
291293
292294 Parameters
@@ -296,13 +298,15 @@ def get_executor_from_factory(self, module: Union[ExecutorFactoryModule, relax.E
296298
297299 The module to upload to the remote
298300 session and load.
301+ hexagon_arch : str
302+ The hexagon arch to be used
299303 """
300304 if isinstance (module , AOTExecutorFactoryModule ):
301305 return self ._aot_executor_from_factory (module )
302306 if isinstance (module , GraphExecutorFactoryModule ):
303307 return self ._graph_executor_from_factory (module )
304308 if isinstance (module , relax .Executable ):
305- return self ._relax_vm_executable_executor (module )
309+ return self ._relax_vm_executable_executor (module , hexagon_arch = hexagon_arch )
306310
307311 raise TypeError (f"Unsupported executor type: { type (module )} " )
308312
@@ -354,7 +358,7 @@ def _graph_executor_from_factory(
354358 """
355359 return self .get_graph_executor (module .get_graph_json (), module .get_lib ())
356360
357- def _relax_vm_executable_executor (self , vm_exec : relax .Executable ):
361+ def _relax_vm_executable_executor (self , vm_exec : relax .Executable , hexagon_arch : str ):
358362 """Create a local TVM module which consumes a remote vm executable.
359363
360364 Paramters
@@ -363,7 +367,8 @@ def _relax_vm_executable_executor(self, vm_exec: relax.Executable):
363367 vm_exec : relax.Executable
364368 The Relax VM Executable to upload to the remote and load. This will typically be the
365369 output of `relax.build`.
366-
370+ hexagon_arch : str
371+ The hexagon arch to be used
367372 Returns
368373 -------
369374 TVMModule :
@@ -377,7 +382,7 @@ def _relax_vm_executable_executor(self, vm_exec: relax.Executable):
377382 vm_exec .mod .export_library (
378383 path_exec ,
379384 fcompile = hexagon .create_aot_shared ,
380- hexagon_arch = "v68" ,
385+ hexagon_arch = hexagon_arch ,
381386 )
382387
383388 path = self .upload (path_exec , "exec.so" )
0 commit comments