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

Cleanup over empty #10

Closed
wants to merge 17 commits into from
Closed

Cleanup over empty #10

wants to merge 17 commits into from

Conversation

jbigot
Copy link
Member

@jbigot jbigot commented Dec 12, 2023

This is a fake PR for #8 to include the whole repo

Copy link
Member

@cedricchevalier19 cedricchevalier19 left a comment

Choose a reason for hiding this comment

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

First thoughts, mainly about CMake

@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.23)
project(kokkos-fft LANGUAGES CXX)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
project(kokkos-fft LANGUAGES CXX)
project (KokkosFFT LANGUAGES CXX)

Should be a good idea to add a version number.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure

Comment on lines +10 to +12
find_package(Kokkos CONFIG)
if(NOT kokkos_FOUND)
add_subdirectory(tpls/kokkos)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
find_package(Kokkos CONFIG)
if(NOT kokkos_FOUND)
add_subdirectory(tpls/kokkos)
find_package (Kokkos)
if (NOT Kokkos_FOUND)
add_subdirectory (tpls/kokkos)

Ideally, we should have a flag to turn off in source Kokkos to help packaging. It is important to fail if Kokkos is not found in the case of Spack.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, this point is not very clear to me. I would appreciate if you could show me examples

endif()

# Googletest
include(CTest)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
include(CTest)

We do not need CTest here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In the end, we need this for execute testing of examples in actions?


# Googletest
include(CTest)
if(BUILD_TESTING)
Copy link
Member

Choose a reason for hiding this comment

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

Option is not previously defined.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This options would be needed for production, build with -DBUILD_TESTING=OFF

Comment on lines +18 to +20
find_package(GTest CONFIG)
if(NOT GTest_FOUND)
add_subdirectory(tpls/googletest)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as for Kokkos

using array_layout_type = typename ViewType::array_layout;

// Convert the input axes to be in the range of [0, rank-1]
std::vector<int> axes;
Copy link
Member

Choose a reason for hiding this comment

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

Why a vector for something of fixed dimensions ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like to test a vector in this line

)

target_compile_features(unit-tests-kokkos-fft-common PUBLIC cxx_std_17)
target_compile_options(unit-tests-kokkos-fft-common PUBLIC -std=c++17)
Copy link
Member

Choose a reason for hiding this comment

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

Why ?? we should not hardcode this kind of flags.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The bottom one can be suppressed? The point is that Kokkos cannot be built without C++17 capability, so I would like to enforce that

Comment on lines +9 to +11
double rtol=1.e-5,
double atol=1.e-8
) {
Copy link
Member

Choose a reason for hiding this comment

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

Magic numbers ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need some fixed numbers anyway. They come from numpy

Kokkos::kokkos
)

target_include_directories(fft INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
Copy link
Member

Choose a reason for hiding this comment

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

Does not work when installed!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will add install capability

)

target_include_directories(fft INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
add_library(Kokkos::fft ALIAS fft)
Copy link
Member

Choose a reason for hiding this comment

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

Should be installed

@yasahi-hpc
Copy link
Collaborator

I put most of the comments in #11 (comment). I am willing to close this PR and make another PR to resole tasks in #11 (comment). Is that OK for you? @jbigot @cedricchevalier19

@cedricchevalier19
Copy link
Member

As you wish @yasahi-hpc

@yasahi-hpc
Copy link
Collaborator

Most of the implementations are made based on the comments. I will close this.

@yasahi-hpc yasahi-hpc closed this Feb 20, 2024
@yasahi-hpc yasahi-hpc deleted the cleanup-over-empty branch October 28, 2024 10:27
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.

3 participants