Update Matrix-based Benchmark

This commit is contained in:
Alauddin Maulana Hirzan 2024-06-16 21:02:48 +07:00
parent 207196a10a
commit 575c687363
Signed by: maulanahirzan
GPG key ID: 484DAC952787FA13
2 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -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) ###