How to use the opentuner.IntegerParameter function in opentuner

To help you get started, we’ve selected a few opentuner examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jansel / opentuner / examples / gccflags / gccflags_minimal.py View on Github external
def manipulator(self):
    """
    Define the search space by creating a
    ConfigurationManipulator
    """
    manipulator = ConfigurationManipulator()
    manipulator.add_parameter(
      IntegerParameter('opt_level', 0, 3))
    for flag in GCC_FLAGS:
      manipulator.add_parameter(
        EnumParameter(flag,
                      ['on', 'off', 'default']))
    for param, min, max in GCC_PARAMS:
      manipulator.add_parameter(
        IntegerParameter(param, min, max))
    return manipulator
github hfp / libxsmm / samples / transpose / transpose_opentuner.py View on Github external
def manipulator(self):
        """
        Define the search space by creating a
        ConfigurationManipulator
        """
        self.mintilesize = 2
        self.granularity = 1
        assert(0 < self.granularity)
        minsize = max(self.mintilesize / self.granularity, 1)
        maxsize = minsize + self.granularity
        m_max = max(min(self.args.maxm, self.args.end), maxsize)
        n_max = max(min(self.args.maxn, self.args.end), maxsize)
        m_max = (m_max + self.granularity - 1) / self.granularity
        n_max = (n_max + self.granularity - 1) / self.granularity
        m_param = IntegerParameter("M", minsize, m_max)
        n_param = IntegerParameter("N", minsize, n_max)
        manipulator = ConfigurationManipulator()
        manipulator.add_parameter(m_param)
        manipulator.add_parameter(n_param)
        return manipulator
github hfp / libxsmm / samples / xgemm / xgemm_opentuner.py View on Github external
def manipulator(self):
        """
        Define the search space by creating a
        ConfigurationManipulator
        """
        self.dimset = libxsmm_utilities.load_mnklist(self.args.mnk, 0, -1)
        self.granularity = 1
        assert(0 < self.granularity)
        m_max = (64 + self.granularity - 1) / self.granularity
        n_max = (256 + self.granularity - 1) / self.granularity
        k_max = (256 + self.granularity - 1) / self.granularity
        m_param = IntegerParameter("M", self.granularity, m_max)
        n_param = IntegerParameter("N", self.granularity, n_max)
        k_param = IntegerParameter("K", self.granularity, k_max)
        manipulator = ConfigurationManipulator()
        manipulator.add_parameter(m_param)
        manipulator.add_parameter(n_param)
        manipulator.add_parameter(k_param)
        return manipulator
github hfp / libxsmm / samples / transpose / transpose_opentuner.py View on Github external
def manipulator(self):
        """
        Define the search space by creating a
        ConfigurationManipulator
        """
        self.mintilesize = 2
        self.granularity = 1
        assert(0 < self.granularity)
        minsize = max(self.mintilesize / self.granularity, 1)
        maxsize = minsize + self.granularity
        m_max = max(min(self.args.maxm, self.args.end), maxsize)
        n_max = max(min(self.args.maxn, self.args.end), maxsize)
        m_max = (m_max + self.granularity - 1) / self.granularity
        n_max = (n_max + self.granularity - 1) / self.granularity
        m_param = IntegerParameter("M", minsize, m_max)
        n_param = IntegerParameter("N", minsize, n_max)
        manipulator = ConfigurationManipulator()
        manipulator.add_parameter(m_param)
        manipulator.add_parameter(n_param)
        return manipulator
github hfp / libxsmm / samples / xgemm / xgemm_opentuner.py View on Github external
def manipulator(self):
        """
        Define the search space by creating a
        ConfigurationManipulator
        """
        self.dimset = libxsmm_utilities.load_mnklist(self.args.mnk, 0, -1)
        self.granularity = 1
        assert(0 < self.granularity)
        m_max = (64 + self.granularity - 1) / self.granularity
        n_max = (256 + self.granularity - 1) / self.granularity
        k_max = (256 + self.granularity - 1) / self.granularity
        m_param = IntegerParameter("M", self.granularity, m_max)
        n_param = IntegerParameter("N", self.granularity, n_max)
        k_param = IntegerParameter("K", self.granularity, k_max)
        manipulator = ConfigurationManipulator()
        manipulator.add_parameter(m_param)
        manipulator.add_parameter(n_param)
        manipulator.add_parameter(k_param)
        return manipulator
github jansel / opentuner / examples / gccflags / gccflags_minimal.py View on Github external
def manipulator(self):
    """
    Define the search space by creating a
    ConfigurationManipulator
    """
    manipulator = ConfigurationManipulator()
    manipulator.add_parameter(
      IntegerParameter('opt_level', 0, 3))
    for flag in GCC_FLAGS:
      manipulator.add_parameter(
        EnumParameter(flag,
                      ['on', 'off', 'default']))
    for param, min, max in GCC_PARAMS:
      manipulator.add_parameter(
        IntegerParameter(param, min, max))
    return manipulator
github GraphIt-DSL / graphit / autotune / graphit_autotuner.py View on Github external
self.enable_parallel_tuning = False
        if self.args.enable_denseVertexSet_tuning == 0:
            self.enable_denseVertexSet_tuning = False


        manipulator = ConfigurationManipulator()
        manipulator.add_parameter(
            EnumParameter('direction', 
                          ['SparsePush','DensePull', 'SparsePush-DensePull', 'DensePush-SparsePush']))
        
        if self.enable_parallel_tuning:
            manipulator.add_parameter(EnumParameter('parallelization',['dynamic-vertex-parallel','edge-aware-dynamic-vertex-parallel']))
        else:
            manipulator.add_parameter(EnumParameter('parallelization', ['serial']))

        manipulator.add_parameter(IntegerParameter('numSSG', 1, self.args.max_num_segments))
        
        if self.enable_NUMA_tuning:
            manipulator.add_parameter(EnumParameter('NUMA',['serial','static-parallel']))

        if self.enable_denseVertexSet_tuning:
            manipulator.add_parameter(EnumParameter('DenseVertexSet', ['boolean-array', 'bitvector']))

        # adding new parameters for PriorityGraph (Ordered GraphIt) 
        manipulator.add_parameter(IntegerParameter('delta', 1, self.args.max_delta))

        manipulator.add_parameter(
            EnumParameter('bucket_update_strategy', 
                          ['eager_priority_update','eager_priority_update_with_merge', 'lazy_priority_update']))

        return manipulator
github phrb / gpu-autotuning / src / tuner / nvcc_flags_tuner.py View on Github external
def manipulator(self):
        manipulator = ConfigurationManipulator()
        for flag in NVCC_FLAGS + PTXAS_FLAGS + NVLINK_FLAGS:
            manipulator.add_parameter(
                    EnumParameter(flag,
                                  ["on", "off"]))

        for d in [NVCC_PARAMS, PTXAS_PARAMS]:
            for flag, values in d.iteritems():
                manipulator.add_parameter(EnumParameter(flag, values))

        for param, pmin, pmax in NVCC_NUM_PARAMS + PTXAS_NUM_PARAMS:
            manipulator.add_parameter(IntegerParameter(param, pmin, pmax))
        return manipulator