giuseppebilotta,

I'm going to present a work on numerical stability of the acoustic terms in #SPH, and as I'm finalizing the conference paper with some benchmarks, I've come across an interesting situation. The cornerstone of the work involves replacing a powf() function with a combination of exp1mf() and logp1f() for higher accuracy.
How much of a performance loss does this higher accuracy involve?
And here's where things get weird.

(1/n)

giuseppebilotta,

When benchmarking just the acoustic terms, the explog form is not only more accurate, but also faster for values of the argument up to FLT_MIN (between 10% and 30% faster), dropping to marginally slower (around 10%) in the remaining range.

HOWEVER, performance on #GPU (both #NVIDIA and #AMD) for an entire simulation when using explog is consistently better (around 4%), whereas on #CPU the same simulation runs 25% slower compared to using the power form.

(2/3)

giuseppebilotta,

I found this drop in performance to be rather surprising. I've only tested this on a low-end AMD Ryzen, so I'm going to run some additional tests on other archs, but I really wonder what could be causing such a drop. (Increased register pressure would be my first guess.)

The problem is, I don't even want to spend that much time on the CPU backend, but at the same time, it's the more general on, we wouldn't want it to be unfairly penalized …

#CFD #HPC
3/3

giuseppebilotta,

The plot thickens! I'm now running on an Android cellphone in Termux, and performance —as pathetic as it might be— is essentially the same for the pow and explog forms.

I think I need at least one more datapoint with an Intel CPU now.

giuseppebilotta,

OK interesting, on an oldish dual-socket Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz (32 threads total), the explog form performance is again on the lowsh side (around 77.5% of the pow form, not as low as the 75% on the AMD Ryzen, but still measurably worse than the 90%, maybe 80% one would expect based on microbenchmarks.

So why the fsck is this happening?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines