Skip to content

Commit

Permalink
Cleaning up some warnings and enabling -Werror on NVIDIA GPU CI tests (
Browse files Browse the repository at this point in the history
…#111)

* Cleaning up some warnings with nvcc

* Enable -Werror for CUDA backend

* format

* Add maybe_unused for fftw backend

* fix: compile options should be set for Kokkos-fft not Kokkos

---------

Co-authored-by: Yuuichi Asahi <[email protected]>
  • Loading branch information
yasahi-hpc and Yuuichi Asahi authored Jul 4, 2024
1 parent e940c45 commit badfefb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
cxx: g++
cmake_flags:
kokkos: -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_AMPERE80=ON
kokkos_fft: ""
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
- name: hip
image: rocm
compiler:
Expand Down
4 changes: 2 additions & 2 deletions common/src/KokkosFFT_transpose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ auto get_map_axes(const ViewType& view, axis_type<DIM> _axes) {
map_inv.push_back(get_index(map, i));
}

using full_axis_type = axis_type<rank>;
full_axis_type array_map, array_map_inv;
using full_axis_type = axis_type<rank>;
full_axis_type array_map = {0}, array_map_inv = {0};
std::copy(map.begin(), map.end(), array_map.begin());
std::copy(map_inv.begin(), map_inv.end(), array_map_inv.begin());

Expand Down
4 changes: 3 additions & 1 deletion fft/src/KokkosFFT_Cuda_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ void _destroy_plan(std::unique_ptr<PlanType>& plan) {
template <typename ExecutionSpace, typename InfoType,
std::enable_if_t<std::is_same_v<ExecutionSpace, Kokkos::Cuda>,
std::nullptr_t> = nullptr>
void _destroy_info(InfoType& plan) {}
void _destroy_info(InfoType&) {
// not used, no finalization is required
}
} // namespace Impl
} // namespace KokkosFFT

Expand Down
3 changes: 2 additions & 1 deletion fft/src/KokkosFFT_OpenMP_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ auto _create(const ExecutionSpace& exec_space, std::unique_ptr<PlanType>& plan,

// For the moment, considering the contiguous layout only
int istride = 1, ostride = 1;
auto sign = KokkosFFT::Impl::direction_type<ExecutionSpace>(direction);
[[maybe_unused]] auto sign =
KokkosFFT::Impl::direction_type<ExecutionSpace>(direction);

plan = std::make_unique<PlanType>();
if constexpr (type == KokkosFFT::Impl::FFTWTransformType::R2C) {
Expand Down

0 comments on commit badfefb

Please sign in to comment.