Constraints on the AutoTVM search space



How do we constraint the search space so that only a few options out of the cross-product of “knobs” are used?
An example to clarify the question:
MCBs = [56, 64]
NCBs = [32, 24]
configs = autotvm.get_config()
configs.define_knob(“MCBs”, MCBs)
configs.define_knob(“NCBs”, NCBs)

I want configs (MCB, NCB) -> [(56, 32), (56, 24), (64, 24)] to be used but not (64, 32). Is there a way to create such constraints on the products on the search spaces?



Currently I do not think we support this use case but it should not be too difficult to add a method to add a user-defined function to ConfigSpace:

However in the past we have not really needed these types of constraints as it is the job of the tuner to deduce nontrivial constraints, and it will quickly learn around trivial constraints (e.g., violating hardware resources as they will raise errors during tuning).