Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Benchmark #20

Open
AkihiroSuda opened this issue May 2, 2023 · 0 comments
Open

Benchmark #20

AkihiroSuda opened this issue May 2, 2023 · 0 comments

Comments

@AkihiroSuda
Copy link
Owner

AkihiroSuda commented May 2, 2023

Benchmark result (May 3, 2023)

RV32IA

  • QEMU: 1413.783 KFLOPS
  • MyAOT (-O0): 1131.420 KFLOPS
  • MyAOT (-O3): 1437.642 KFLOPS

Preparation

wget -O linpack.c https://netlib.org/benchmark/linpackc.new
/opt/riscv/bin/riscv32-unknown-linux-gnu-gcc -march=rv32i -mabi=ilp32 -O3 -static -o linpack-riscv32 linpack.c

QEMU usermode

Enter array size (q to quit) [200]:  
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
       1   0.99  94.61%   3.51%   1.88%   1413.783
       2   1.94  95.28%   3.44%   1.28%   1437.227
       4   3.85  95.33%   3.42%   1.26%   1445.657
       8   8.18  95.42%   3.37%   1.22%   1359.155
      16  16.69  95.29%   3.46%   1.25%   1332.948

Enter array size (q to quit) [200]:  q

MyAOT

commit ff3e62d (May 3, 2023)

$ time myaot compile -o a.out.c linpack-riscv32
INFO[0000] Compiling linpack-riscv32 --> a.out.c        
INFO[0000] Done: a.out.c                                

real    0m0.755s
user    0m0.277s
sys     0m0.506s

-O0

$ time clang -O0 a.out.c && ./a.out

real    0m5.097s
user    0m4.911s
sys     0m0.185s
Enter array size (q to quit) [200]:  
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
       1   1.24  94.52%   3.14%   2.34%   1131.420
       2   2.43  95.33%   3.21%   1.46%   1145.865
       4   5.30  95.45%   3.12%   1.43%   1051.734
       8  10.46  95.39%   3.16%   1.45%   1066.296

Enter array size (q to quit) [200]:  q

-O3

$ time clang -O3 a.out.c && ./a.out

real    3m42.349s
user    3m41.985s
sys     0m0.283s
Enter array size (q to quit) [200]:  
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
       1   0.97  94.91%   3.41%   1.68%   1437.642
       2   1.96  95.50%   3.52%   0.98%   1416.455
       4   4.11  95.59%   3.46%   0.95%   1349.024
       8   7.93  95.55%   3.50%   0.94%   1397.990
      16  15.06  95.49%   3.56%   0.95%   1473.143

Enter array size (q to quit) [200]:  q

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant