You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ru...@apache.org on 2023/09/21 14:00:30 UTC

[tvm] branch unity updated: [Unity] Fix dlight bench when func_name is global var (#15793)

This is an automated email from the ASF dual-hosted git repository.

ruihangl pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new c8ebc6c520 [Unity] Fix dlight bench when func_name is global var (#15793)
c8ebc6c520 is described below

commit c8ebc6c520293ea32351a65f52979a1fb906be7f
Author: Wuwei Lin <wu...@apache.org>
AuthorDate: Thu Sep 21 07:00:21 2023 -0700

    [Unity] Fix dlight bench when func_name is global var (#15793)
    
    This PR fixed error when func name is global var. time_evaluator expects func_name to be a string instead of global var.
---
 python/tvm/dlight/benchmark/bench.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/tvm/dlight/benchmark/bench.py b/python/tvm/dlight/benchmark/bench.py
index 4452baede8..a5c6f05f74 100644
--- a/python/tvm/dlight/benchmark/bench.py
+++ b/python/tvm/dlight/benchmark/bench.py
@@ -88,6 +88,7 @@ def benchmark(
         mod = mod_or_func
         # assume only one global function
         (func_name,) = mod.get_global_vars()
+        func_name = func_name.name_hint
     # produce input shapes
     if args is None:
         args, _ = extract_func_info_from_prim_func(mod[func_name])