From 207196a10ae408d2d4f6a4324a14c48db9c09962 Mon Sep 17 00:00:00 2001 From: Alauddin Maulana Hirzan Date: Sun, 16 Jun 2024 20:54:03 +0700 Subject: [PATCH] Update Matrix-based Benchmark --- Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py | 2 +- Matrix-based Benchmark/README.md | 3 ++- Matrix-based Benchmark/SciPy/MatrixBench-SciPy.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py index cd6ca21..ee827fe 100644 --- a/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py +++ b/Matrix-based Benchmark/NumPy/MatrixBench-NumPy.py @@ -32,7 +32,7 @@ class MatrixBench(): def run(self): print("# Linpack-like Matrix-based Floating Point Benchmark #") print("# Using NumPy as Core #") - for i in range(0, self.iters+1): + 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() diff --git a/Matrix-based Benchmark/README.md b/Matrix-based Benchmark/README.md index 20d0753..fe9e8ee 100644 --- a/Matrix-based Benchmark/README.md +++ b/Matrix-based Benchmark/README.md @@ -1,7 +1,8 @@ # Matrix-based CPU Benchmark # +### Inspired by Linpack HPL benchmark ### ## Contains two options: ## * NumPy script (which requires numpy lib) <= Preferable * SciPy script (which requires scipy lib) -### Warning: SciPy based scipt kinda buggy and produces many warnings (the warnings already suppresed for visual) ### +### Warning: SciPy based scipt kinda buggy and produces many warnings (the warnings are already suppresed for visual) ### diff --git a/Matrix-based Benchmark/SciPy/MatrixBench-SciPy.py b/Matrix-based Benchmark/SciPy/MatrixBench-SciPy.py index 3db61b6..587ec9d 100644 --- a/Matrix-based Benchmark/SciPy/MatrixBench-SciPy.py +++ b/Matrix-based Benchmark/SciPy/MatrixBench-SciPy.py @@ -42,7 +42,7 @@ class MatrixBench(): def run(self): print("# Linpack-like Matrix-based Floating Point Benchmark #") print("# Using SciPy as Core (contains Warn: Ill-conditioned Matrix) #") - for i in range(0, self.iters + 1): + 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()