Skip to content

Commit

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

* remove unused lines for HIP backend

* Add warnings on HIP CI

* Add Werror option in hip CI

* Add maybe_unused for fftw backend

---------

Co-authored-by: Yuuichi Asahi <[email protected]>
  • Loading branch information
yasahi-hpc and Yuuichi Asahi authored Jul 3, 2024
1 parent 2c616d2 commit e940c45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ jobs:
cxx: hipcc
cmake_flags:
kokkos: -DKokkos_ENABLE_HIP=ON -DKokkos_ARCH_VEGA90A=ON
kokkos_fft: -DKokkosFFT_ENABLE_ROCFFT=ON
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror" -DKokkosFFT_ENABLE_ROCFFT=ON
- name: rocm
image: rocm
compiler:
c: hipcc
cxx: hipcc
cmake_flags:
kokkos: -DKokkos_ENABLE_HIP=ON -DKokkos_ARCH_VEGA90A=ON
kokkos_fft: ""
kokkos_fft: -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
- name: sycl
image: intel
compiler:
Expand Down
4 changes: 3 additions & 1 deletion fft/src/KokkosFFT_HIP_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ void _destroy_plan(std::unique_ptr<PlanType>& plan) {
template <typename ExecutionSpace, typename InfoType,
std::enable_if_t<std::is_same_v<ExecutionSpace, Kokkos::HIP>,
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
2 changes: 1 addition & 1 deletion fft/src/KokkosFFT_OpenMP_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace KokkosFFT {
namespace Impl {
template <typename ExecutionSpace, typename T>
void _init_threads(const ExecutionSpace& exec_space) {
void _init_threads([[maybe_unused]] const ExecutionSpace& exec_space) {
#if defined(KOKKOS_ENABLE_OPENMP) || defined(KOKKOS_ENABLE_THREADS)
int nthreads = exec_space.concurrency();

Expand Down
7 changes: 0 additions & 7 deletions fft/src/KokkosFFT_ROCM_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ auto _create(const ExecutionSpace& exec_space, std::unique_ptr<PlanType>& plan,
static_assert(
InViewType::rank() >= fft_rank,
"KokkosFFT::_create: Rank of View must be larger than Rank of FFT.");
const int rank = fft_rank;

constexpr auto type =
KokkosFFT::Impl::transform_type<ExecutionSpace, in_value_type,
Expand All @@ -114,11 +113,6 @@ auto _create(const ExecutionSpace& exec_space, std::unique_ptr<PlanType>& plan,
int fft_size = std::accumulate(fft_extents.begin(), fft_extents.end(), 1,
std::multiplies<>());

auto* idata = reinterpret_cast<typename KokkosFFT::Impl::fft_data_type<
ExecutionSpace, in_value_type>::type*>(in.data());
auto* odata = reinterpret_cast<typename KokkosFFT::Impl::fft_data_type<
ExecutionSpace, out_value_type>::type*>(out.data());

// For the moment, considering the contiguous layout only
// Create plan
auto in_strides = compute_strides<int, std::size_t>(in_extents);
Expand Down Expand Up @@ -211,7 +205,6 @@ template <typename ExecutionSpace, typename InfoType,
void _destroy_info(InfoType& execution_info) {
rocfft_execution_info_destroy(execution_info);
}

} // namespace Impl
} // namespace KokkosFFT

Expand Down

0 comments on commit e940c45

Please sign in to comment.