def manipulator(self): """ The definition of the manipulator is meant to mimic the Halide::Schedule data structure and defines the configuration space to search """ manipulator = HalideConfigurationManipulator(self) manipulator.add_parameter(HalideComputeAtScheduleParameter( 'schedule', self.args, self.settings['functions'], self.post_dominators)) for func in self.settings['functions']: name = func['name'] manipulator.add_parameter(PermutationParameter( '{0}_store_order'.format(name), func['vars'])) manipulator.add_parameter( BooleanParameter('{0}_store_order_enabled'.format(name))) manipulator.add_parameter(self.compute_order_parameter(func)) for var in func['vars']: manipulator.add_parameter(PowerOfTwoParameter( '{0}_vectorize'.format(name), 1, self.args.max_split_factor)) manipulator.add_parameter(PowerOfTwoParameter( '{0}_unroll'.format(name), 1, self.args.max_split_factor)) manipulator.add_parameter(BooleanParameter( '{0}_parallel'.format(name))) for nesting in range(1, self.args.nesting): manipulator.add_parameter(PowerOfTwoParameter( '{0}_splitfactor_{1}_{2}'.format(name, nesting, var), 1, self.args.max_split_factor)) return manipulator
def manipulator(self): """ Define the search space by creating a ConfigurationManipulator """ manipulator = ConfigurationManipulator() manipulator.add_parameter( PermutationParameter('hls_order', list(range(NUM_PASSES)))) for i in range(NUM_PASSES): manipulator.add_parameter(BooleanParameter( 'hls_pass_{}'.format(i))) return manipulator
def manipulator(self): manipulator = ConfigurationManipulator() manipulator.add_parameter( PermutationParameter(0, list(range(len(self.distance))))) return manipulator
def manipulator(self): manipulator = ConfigurationManipulator() manipulator.add_parameter(PermutationParameter(0, range(SIZE))) return manipulator