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

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


The following commit(s) were added to refs/heads/main by this push:
     new d949d15  Revert "[AutoTVM-FIX] avoid unexpected value(1) of search 
space when get length for uninitiated search space (#7175)" (#7236)
d949d15 is described below

commit d949d153a59448e14f594ae4ccb815de3817bef7
Author: Lianmin Zheng <[email protected]>
AuthorDate: Sat Jan 9 09:17:20 2021 -0800

    Revert "[AutoTVM-FIX] avoid unexpected value(1) of search space when get 
length for uninitiated search space (#7175)" (#7236)
    
    This reverts commit f2ab977de0ac543cae77d3bef76af1b56dd61eed.
---
 python/tvm/autotvm/task/space.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/python/tvm/autotvm/task/space.py b/python/tvm/autotvm/task/space.py
index b24ab41..cf9cd80 100644
--- a/python/tvm/autotvm/task/space.py
+++ b/python/tvm/autotvm/task/space.py
@@ -836,8 +836,6 @@ class ConfigSpace(object):
         return [Axis(None, i) for i in range(space_class.get_num_output(axes, 
policy, **kwargs))]
 
     def __len__(self):
-        if not self.space_map:
-            return 0
         if self._length is None:
             self._length = int(np.prod([len(x) for x in 
self.space_map.values()]))
         return self._length

Reply via email to