Have a question about config space in autotvm, have searched in the script about the calculation for configspace but have not found anything, If anyone has some ideas on how this is calculated, it could help me.
For example, we can take the Auto-tuning a convolutional network for x86 CPU here, we can see that the first layer configspace value is 252, how this value is calculated internally. Also, the convolution attributes are
This function calculates the total size of a config space:
# convert schedule axis to space definition axis
axes = [x if isinstance(x, (VirtualAxis, Axis)) else self.axis(x) for x in axes]
# add subspace (knob)
space = space_class(axes, policy, **kwargs)
self.space_map[name] = space
self._entity_map[name] = space[0]
return [Axis(space, i) for i in range(space.num_output)]
return [Axis(None, i) for i in range(space_class.get_num_output(axes, policy, **kwargs))]
def __len__(self):
if self._length is None:
self._length = int(np.prod([len(x) for x in self.space_map.values()]))
return self._length
def get(self, index):
"""Get a config entity with detailed parameters from this space
Parameters
----------
index: int
And this function goes through each config in the config space:
"""get the transform entity(knob) of this entity by name
do not use this to get a ConfigEntity of this space (should use ConfigSpace.get instead)
Parameters
----------
name: str
name of the transform
"""
return self._entity_map[name]
def __repr__(self):
res = "ConfigSpace (len=%d, space_map=\n" % len(self)
for i, (name, space) in enumerate(self.space_map.items()):
res += " %2d %s: %s\n" % (i, name, space)
return res + ")"
_ann_to_number = {
"none": 0,
"vec": 1,
"unroll": 2,
2 Likes
What will be the default tile factor in the loop for any operations