Closed leslie-fang-intel closed 2 years ago
There are a few options. One way would be to override Parameter.normalize()
to map invalid configs to the "closest" valid config. Or implement a custom Parameter subclass to encode your constraints.
Another option, that might be easier, would be to rewrite your search space in a way where all points are valid. For your example, you could reframe your problem in terms of more primitive parameters:
p1 = a
p2 = a * b
p3 = floor(c*(p2//p1))
a
would be the same enum. b
would be an integer. c
would be a float from 0 to 1.
This mapping encodes your constraints as a projection in configuration space.
Thanks for the reply, I will take a try.
Hi @jansel, I have a question to define parameters for my tuning case. I have 3 parameters to tune:
EnumParameter
with a list of candidates, for example [1, 2, 4, 7, 14, 28]Parameter1
.Parameter2//Parameter1
.Could you kindly help to take a look how can I define these parameters in openTuner to tune?