Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ddc, fft, pdi and splines targets #671

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

tpadioleau
Copy link
Member

@tpadioleau tpadioleau commented Oct 31, 2024

Current public targets:

  • DDC::core contains the core part of DDC
  • DDC::pdi and DDC::PDI_Wrapper (deprecated) contain the PDI extension
  • DDC::fft contains the FFT extension
  • DDC::splines contains the Splines extension
  • DDC::DDC contains all

@tpadioleau tpadioleau self-assigned this Oct 31, 2024
@tpadioleau tpadioleau linked an issue Oct 31, 2024 that may be closed by this pull request
@tpadioleau tpadioleau force-pushed the 667-create-cmake-targets-for-fft-and-splines branch 3 times, most recently from e913a7d to 5baad36 Compare October 31, 2024 22:42
@tpadioleau tpadioleau changed the title Add a ddc, fft, pdi and splines targets Add ddc, fft, pdi and splines targets Nov 1, 2024
@tpadioleau tpadioleau force-pushed the 667-create-cmake-targets-for-fft-and-splines branch 3 times, most recently from 8063414 to 583a0f2 Compare November 4, 2024 17:26
CMakeLists.txt Outdated Show resolved Hide resolved
jbigot
jbigot previously approved these changes Nov 5, 2024
Copy link
Member

@jbigot jbigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

cmake/DDCConfig.cmake.in Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@tpadioleau
Copy link
Member Author

Looks great

thanks!

@tpadioleau tpadioleau force-pushed the 667-create-cmake-targets-for-fft-and-splines branch from b3deddd to 3bda09a Compare November 6, 2024 09:07
@tpadioleau
Copy link
Member Author

tpadioleau commented Nov 6, 2024

  1. Should we internally use ddc_ or DDC:: targets ?

  2. The NAMESPACE DDC:: option is almost then unused, only DDC::PDI_Wrapper and DDC::DDC take advantage of it. An alternative could be to use it for an impl namespace and keep an explicit management of the public namespace. For example:

    • in the CMakeLists.txt: install(EXPORT DDCTargets NAMESPACE DDC::Impl:: DESTINATION lib/cmake/DDC)
    • in the DDCConfig.cmake: add_library(DDC::core ALIAS DDC::Impl::ddc_core)

jbigot
jbigot previously approved these changes Nov 6, 2024
Copy link
Member

@jbigot jbigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty ready to me. Great work!

CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@jbigot
Copy link
Member

jbigot commented Nov 6, 2024

  1. Should we internally use ddc_ or DDC:: targets ?

    1. The NAMESPACE DDC:: option is almost then unused, only DDC::PDI_Wrapper and DDC::DDC take advantage of it. An alternative could be to use it for an impl namespace and keep an explicit management of the public namespace. For example:

      • in the CMakeLists.txt: install(EXPORT DDCTargets NAMESPACE DDC::Impl:: DESTINATION lib/cmake/DDC)
      • in the DDCConfig.cmake: add_library(DDC::core ALIAS DDC::Impl::ddc_core)

On my side, I use the following policy:

  • use the non-namespaced, private target (ddc_*) when creating them
  • use the namespaced, public target (DDC::*) when using them

so you'd have for example:

target_link_libraries(ddc_fft INTERFACE DDC::core Kokkos::kokkos KokkosFFT::fft)

ddc_fft, but DDC::core

  1. DDC::Impl::ddc_* instead of DDC::ddc_* sounds like a good idea indeed, maybe makes it clearer that this is a private identifier.

@tpadioleau tpadioleau merged commit feed2f2 into main Nov 7, 2024
55 checks passed
@tpadioleau tpadioleau deleted the 667-create-cmake-targets-for-fft-and-splines branch November 7, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create cmake targets for fft and splines
2 participants