From 1ac263b743dcb9abfd51be28463732288d8e5cc8 Mon Sep 17 00:00:00 2001 From: Alauddin Maulana Hirzan Date: Wed, 19 Jun 2024 05:23:45 +0700 Subject: [PATCH] Update Matrix-based Benchmark --- Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py index 362943b..6697370 100644 --- a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py +++ b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py @@ -34,22 +34,22 @@ class MatrixBench(): print("# Using NumPy as Core #") print(f"# Matrix Size : {self.size} #") print(f"# Iterations : {self.iters} #") + print("# Please Wait #") for i in range(1, self.iters+1): - print(f"=> Epoch #{str(i).zfill(len(str(self.iters)))}", end="\r") self.create_matrices() self.do_operation() self.do_calculate() - print("\n") + self.avg_flops: float = (self.average/self.iters) / 1000000 - print(f"Result : {self.avg_flops:.2f} MFLOPS") + print(f"=> Result : {self.avg_flops:.2f} MFLOPS") def main(): # Adjust Matrix Size size = 512 # Adjust Iteration Time - iters = 10000 + iters = 1000 # Run Benchmark bench = MatrixBench(iters=iters, size=size) bench.run()