From 575c687363e6d31ff89d8bcbbaa1acf3c0045d59 Mon Sep 17 00:00:00 2001 From: Alauddin Maulana Hirzan Date: Sun, 16 Jun 2024 21:02:48 +0700 Subject: [PATCH] Update Matrix-based Benchmark --- Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py | 6 +++++- Matrix-based Benchmark/README.md | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py index ee827fe..362943b 100644 --- a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py +++ b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py @@ -32,18 +32,22 @@ class MatrixBench(): def run(self): print("# Linpack-like Matrix-based Floating Point Benchmark #") print("# Using NumPy as Core #") + print(f"# Matrix Size : {self.size} #") + print(f"# Iterations : {self.iters} #") + 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") def main(): # Adjust Matrix Size - size = 192 + size = 512 # Adjust Iteration Time iters = 10000 # Run Benchmark diff --git a/Matrix-based Benchmark/README.md b/Matrix-based Benchmark/README.md index fe9e8ee..4a7f7b6 100644 --- a/Matrix-based Benchmark/README.md +++ b/Matrix-based Benchmark/README.md @@ -2,7 +2,8 @@ ### Inspired by Linpack HPL benchmark ### ## Contains two options: ## -* NumPy script (which requires numpy lib) <= Preferable -* SciPy script (which requires scipy lib) +* NumPy script (which requires numpy lib) <= **Run This** + * Increase **the matrix size** as you wish +* SciPy script (which requires scipy lib) <= No Further Update, **Do not run** ### Warning: SciPy based scipt kinda buggy and produces many warnings (the warnings are already suppresed for visual) ###