Beispiel #1
0
 def __init__(self, arch: str):
     super().__init__('fill', arch, basic_repeat_times=10)
     fill_container = Container()
     fill_container.update({'sparse': None})  # None: implement by feature
     self.create_plan(fill_container, DataType(), DataSize(), MetricType())
     # use tag_list to label the customized implementation (funcs).
     self.add_func(['field'], fill_default)
     self.add_func(['ndarray'], fill_default)
     self.add_func(['sparse'], fill_sparse)
Beispiel #2
0
 def __init__(self, arch: str):
     super().__init__('atomic_ops', arch, basic_repeat_times=10)
     atomic_ops = AtomicOps()
     atomic_ops.remove(
         ['atomic_sub', 'atomic_and', 'atomic_xor', 'atomic_max'])
     self.create_plan(atomic_ops, Container(), DataType(), DataSize(),
                      MetricType())
     self.add_func(['field'], reduction_default)
     self.add_func(['ndarray'], reduction_default)
Beispiel #3
0
 def __init__(self, arch: str):
     super().__init__('memcpy', arch, basic_repeat_times=10)
     self.create_plan(Container(), DataType(), DataSize(), MetricType())
     self.add_func(['field'], memcpy_default)
     self.add_func(['ndarray'], memcpy_default)