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

Disable empty return for _NVCOMPILER #356

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

tcclevenger
Copy link
Contributor

@tcclevenger tcclevenger commented Aug 29, 2024

These empty returns trigger code_is_unreachable warning for nvc++ compiler. We want to incorporate changes in kokkos/kokkos#7250.

"/var/jenkins/workspace/Kokkos_PR-7226/tpls/mdspan/include/mdspan/../experimental/__p2642_bits/layout_padded.hpp", line 64: warning: statement is unreachable [code_is_unreachable]
  return 0; 
  ^
          detected during:
            instantiation of class "Kokkos::Experimental::detail::static_array_type_for_padded_extent<_PaddingValue, _Extents, _ExtentToPadIdx, _Rank, Enabled> [with _PaddingValue=18446744073709551615UL, _Extents=Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>, _ExtentToPadIdx=0UL, _Rank=2UL, Enabled=void]" at line 95
            instantiation of class "Kokkos::Experimental::detail::padded_extent<_PaddingValue, _Extents, _ExtentToPadIdx> [with _PaddingValue=18446744073709551615UL, _Extents=Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>, _ExtentToPadIdx=0UL]" at line 174
            instantiation of class "Kokkos::Experimental::layout_left_padded<padding_value>::mapping<Extents> [with padding_value=18446744073709551615UL, Extents=Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>]" at line 883 of "/usr/include/c++/9/type_traits"
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=Kokkos::Experimental::layout_left_padded<18446744073709551615UL>::mapping<Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>>, _Args=<Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>>]" at line 2912 of "/usr/include/c++/9/type_traits"
            instantiation of "const bool std::is_constructible_v [with _Tp=Kokkos::Experimental::layout_left_padded<18446744073709551615UL>::mapping<Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>>, _Args=<Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>>]" at line 118 of "/var/jenkins/workspace/Kokkos_PR-7226/tpls/mdspan/include/mdspan/../experimental/__p0009_bits/mdspan.hpp"
            instantiation of class "Kokkos::mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy> [with ElementType=int, Extents=Kokkos::extents<std::size_t, 18446744073709551615UL, 18446744073709551615UL>, LayoutPolicy=Kokkos::Experimental::layout_left_padded<18446744073709551615UL>, AccessorPolicy=Kokkos::Impl::SpaceAwareAccessor<Kokkos::CudaSpace::memory_space, Kokkos::default_accessor<int>>]" at line 1109 of "/var/jenkins/workspace/Kokkos_PR-7226/core/src/View/Kokkos_ViewLegacy.hpp"
            instantiation of "Kokkos::View<DataType, Properties...>::View(const Kokkos::Impl::ViewCtorProp<P...> &, std::enable_if_t<<expression>, size_t>, size_t, size_t, size_t, size_t, size_t, size_t, size_t) [with DataType=int **, Properties=<Kokkos::Cuda>, P=<Kokkos::Impl::WithoutInitializing_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>]" at line 49 of "/var/jenkins/workspace/Kokkos_PR-7226/core/unit_test/TestTeam.hpp"
            instantiation of "Test::_GLOBAL__N__31d3ebdc_22_TestCuda_TeamBasic_cpp_a92a69dc::TestTeamPolicy<ExecSpace, ScheduleType>::TestTeamPolicy(size_t) [with ExecSpace=Kokkos::Cuda, ScheduleType=Kokkos::Schedule<Kokkos::Static>]" at line 141 of "/var/jenkins/workspace/Kokkos_PR-7226/core/unit_test/TestTeam.hpp"
            instantiation of "void Test::_GLOBAL__N__31d3ebdc_22_TestCuda_TeamBasic_cpp_a92a69dc::TestTeamPolicy<ExecSpace, ScheduleType>::test_for(size_t) [with ExecSpace=Kokkos::Cuda, ScheduleType=Kokkos::Schedule<Kokkos::Static>]" at line 24 of "/var/jenkins/workspace/Kokkos_PR-7226/core/unit_test/TestTeamBasic.hpp"

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

```
Run ctest --output-on-failure --
CMake Error: Unknown argument: --
CMake Error: Run 'ctest --help' for all supported options.
Copy link
Contributor

@nmm0 nmm0 left a comment

Choose a reason for hiding this comment

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

Can you edit the description to show what warning this fixes? Otherwise, looks good to me!

@dalg24 dalg24 merged commit c2494ad into kokkos:stable Aug 29, 2024
15 checks passed
@tcclevenger tcclevenger deleted the nvhpc_warnings branch August 29, 2024 15:38
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.

5 participants