vetter / shoc

The SHOC Benchmark Suite
Other
247 stars 102 forks source link

MaxFlops reports crazy numbers for Apple M1 #81

Open jeffhammond opened 2 years ago

jeffhammond commented 2 years ago

The MaxFlops test reports >100 petaflop/s FP32 for Apple M1, which false suggest that my M1 Air laptop is the second most powerful supercomputer in Europe.

Disabling compiler optimizations (below) makes the problem smaller but does not fix it, as the results are still 4-17 teraflop/s FP32, which is greater than the performance claimed by Apple or reported by third-parties.

static const char* opts = "-cl-mad-enable -cl-no-signed-zeros -cl-opt-disable";
                          //"-cl-unsafe-math-optimizations -cl-finite-math-only";

It would seem that the benchmark should be modified to prevent compilers from removing large portions of the computation.

jyoung3131 commented 1 year ago

Hi Jeff - I worked on this benchmark back in the day (2014?) and a large part of our efforts were focused on keeping the compiler from optimizing out computation, sometimes to the point of adding redundant and indirect references. It turns out that compilers are actually really good at optimizing "useless" code, so I'm not surprised that it is reporting erroneous results for the M1.

Realistically, some of the feeds and speeds (ie, BW tests) are still useful, but SHOC has not been fully updated in some time. As such, I'd be very wary of any results from the MaxFlops test unless/until a new version of the code is released.