ascent icon indicating copy to clipboard operation
ascent copied to clipboard

Is `-munsafe-fp-atomics` safe on AMD GPUs?

Open pgrete opened this issue 1 year ago • 2 comments

How many device atomics are used in Ascent and it's software stack and is the internal programming/memory model safe with regard to this, see https://docs.olcf.ornl.gov/systems/frontier_user_guide.html#floating-point-fp-atomic-operations-and-coarse-fine-grained-memory-allocations ?

We've been using Kokkos::ScatterViews on AMD and without hardware atomics performance is >100x worse than with so I'm wondering if it's safe to globally turn on when compiling Ascent (and not just for our downstream code that links against Ascent).

pgrete avatar Jan 25 '24 11:01 pgrete

@pgrete We are using atomics and I believe our allocations are coarse grained - which would be compatible with -munsafe-fp-atomics.

I looked at the allocs we use with RAJA + I asked the VTK-m team to check. Since VTK-m is are using Kokkos and default device allocations are coarse grained, I would expect them to be fine.

We haven't done any explicit performance testing with this flag (unless VTK-m or Kokkos is turning it on for us)

cyrush avatar Jan 31 '24 22:01 cyrush

Great, thanks, I'll give this a try. Feel free to close the issue once confirmed with the other libs.

pgrete avatar Feb 01 '24 13:02 pgrete