Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
Define the search space by creating a
ConfigurationManipulator
"""
if not self.args.enable_NUMA_tuning == 1:
self.enable_NUMA_tuning = False
if not self.args.enable_parallel_tuning == 1:
self.enable_parallel_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, 20))
if self.enable_NUMA_tuning:
manipulator.add_parameter(EnumParameter('NUMA',['serial','static-parallel']))
return manipulator
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
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
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
self.enable_NUMA_tuning = False
if not self.args.enable_parallel_tuning == 1:
self.enable_parallel_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, 20))
if self.enable_NUMA_tuning:
manipulator.add_parameter(EnumParameter('NUMA',['serial','static-parallel']))
return manipulator
def manipulator(self):
"""
Define the search space by creating a
ConfigurationManipulator
"""
if not self.args.enable_NUMA_tuning == 1:
self.enable_NUMA_tuning = False
if not self.args.enable_parallel_tuning == 1:
self.enable_parallel_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, 20))
if self.enable_NUMA_tuning:
manipulator.add_parameter(EnumParameter('NUMA',['serial','static-parallel']))
return manipulator
Define the search space by creating a
ConfigurationManipulator
"""
# set the global flags needed for printing schedules
if self.args.enable_NUMA_tuning == 0:
self.enable_NUMA_tuning = False
if self.args.enable_parallel_tuning == 0:
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)
ConfigurationManipulator
"""
if not self.args.enable_NUMA_tuning == 1:
self.enable_NUMA_tuning = False
if not self.args.enable_parallel_tuning == 1:
self.enable_parallel_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, 20))
if self.enable_NUMA_tuning:
manipulator.add_parameter(EnumParameter('NUMA',['serial','static-parallel']))
return manipulator
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