caffeine icon indicating copy to clipboard operation
caffeine copied to clipboard

Rework `prif_co_reduce` implementation

Open ktras opened this issue 11 months ago • 3 comments

Rework the prif_co_reduce implementation to stop using the current strategy involving the abstract interfaces for the various C interoperable types. This may be a prerequisite to supporting non-blocking co_reduce.

ktras avatar Feb 28 '24 19:02 ktras

We should also allow it to support reduction on derived types. See #72

everythingfunctional avatar Mar 07 '24 22:03 everythingfunctional

Tangential note: Motivated by this use case, we've opened two relevant GASNet-EX enhancement requests that would each eventually help enable Caffeine to provide non-blocking co_reduce for all allowed types:

  • Bug 4696 - RFE: user_cdata cleanup for reduction operations
  • Bug 4697 - RFE: provide more data to user-defined reduction operators

Hopefully at least one of these will be deployed by the time we reach that stage.

This is orthogonal to the cleanups needed for the current blocking co_reduce implementation.

bonachea avatar Mar 14 '24 02:03 bonachea

Another related task for cleaning up co_reduce implementation:

Stop repeatedly calling caf_same_cfi_type() in co_reduce (each of which entails a cross-language call) and instead use select type to make this faster for at least the built-in types.

bonachea avatar Mar 27 '24 18:03 bonachea