Example #1
0
 def save(self, benchmark_dir='./'):
     #folder of archs
     arch_dir = os.path.join(benchmark_dir, arch_name(self._arch))
     os.makedirs(arch_dir)
     for suite in self._suites:
         suite.save_as_json(arch_dir)
         suite.save_as_markdown(arch_dir)
Example #2
0
 def run(self):
     ti.init(kernel_profiler=True, arch=self.arch)
     print("TestCase[%s.%s.%s]" % (self.func.__name__, arch_name(
         self.arch), dtype2str[self.test_dtype]))
     for test_dsize in self.test_dsize_list:
         print("test_dsize = %s" % (size2str(test_dsize)))
         self.min_time_in_us.append(
             self.func(self.arch, self.test_dtype, test_dsize,
                       MemoryBound.basic_repeat_times))
         time.sleep(0.2)
     ti.reset()
Example #3
0
File: run.py Project: galek/taichi
def main():

    benchmark_dir = os.path.join(os.getcwd(), 'results')
    os.makedirs(benchmark_dir)

    for arch in benchmark_archs:
        #make dir
        arch_dir = os.path.join(benchmark_dir, arch_name(arch))
        os.makedirs(arch_dir)
        #init & run
        suites = BenchmarkSuites(arch)
        suites.run()
        #save result
        suites.save_to_markdown(arch_dir)
Example #4
0
 def add_suites_info(self, arch, suites):
     self.archs[arch_name(arch)] = suites.get_suites_name()