pumi-pic icon indicating copy to clipboard operation
pumi-pic copied to clipboard

Deprecate `MyPair`

Open Sichao25 opened this issue 6 months ago • 6 comments

Deprecated the MyPair struct, which is not used in any current functionality. Kokkos::pair is preferred for any scenarios requiring similar data structures.

Sichao25 avatar Aug 09 '25 00:08 Sichao25

Thank you @Sichao25. Before this can be merged we need to check that GITRm, XGCm, COMET, and PUMI-Tally aren't using this interface. You should have access to the GITRm and XGCm repos. I'm not sure about PUMI-Tally.

@zhangchonglin Would you please grep for PairView in COMET?

cwsmith avatar Aug 09 '25 11:08 cwsmith

Thank you @cwsmith, @Sichao25. Comet is not using PairView. Actually, I also have to delete part of that function (the use of that) to compile on Aurora:

#ifdef PP_USE_GPU
namespace Kokkos {
  using pumipic::MyPair;
  PP_DEVICE_VAR MyPair ma = MyPair(10000000);
  PP_DEVICE_VAR MyPair mi = MyPair(0);
  template <>
  struct reduction_identity<MyPair> {
    KOKKOS_FORCEINLINE_FUNCTION constexpr static const MyPair& max() {return ma;}
    KOKKOS_FORCEINLINE_FUNCTION constexpr static const  MyPair& min() {return mi;}
  };
}
#endif

zhangchonglin avatar Aug 09 '25 13:08 zhangchonglin

I was thinking we could start with the ``[[deprecated]]` attribute, but if we can confirm that none of the downstream applications make use of this I'm fine with completely removing it.

jacobmerson avatar Aug 15 '25 02:08 jacobmerson

PumiTally does not use this. @dhyan1272 do you use any MyPair in GITRM?

jacobmerson avatar Aug 15 '25 02:08 jacobmerson

No I do not use it in GITRm

dhyan1272 avatar Aug 15 '25 03:08 dhyan1272

Given that we are changing the API (albeit an apparently unused portion), I think we should increase the major version number in CMakeLists.txt. Thoughts?

I agree.

jacobmerson avatar Aug 15 '25 19:08 jacobmerson

@Sichao25 I think as soon as you bump the version number in the CMakeLists.txt we can merge this.

jacobmerson avatar Nov 10 '25 03:11 jacobmerson