Skip to content

Commit

Permalink
Don't try to compile the test for any backend with MSVC+Cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Feb 7, 2024
1 parent 19dcd64 commit 26060fe
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions core/unit_test/TestOccupancyControlTrait.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,16 @@ void test_prefer_desired_occupancy(Policy policy) {
test_policy_execution(policy_drop_occ);
}

TEST(TEST_CATEGORY, occupancy_control) {
// FIXME_MSVC_WITH_CUDA
// This test doesn't compile with CUDA on Windows
#if defined(_WIN32) && defined(KOKKOS_ENABLE_CUDA)
if constexpr (!std::is_same_v<TEST_EXECSPACE, Kokkos::Cuda>)
#endif
{
test_prefer_desired_occupancy(DummyPolicy<TEST_EXECSPACE>{});
test_prefer_desired_occupancy(Kokkos::RangePolicy<TEST_EXECSPACE>(0, 0));
test_prefer_desired_occupancy(
Kokkos::TeamPolicy<TEST_EXECSPACE>{0, Kokkos::AUTO});
test_prefer_desired_occupancy(
Kokkos::MDRangePolicy<TEST_EXECSPACE, Kokkos::Rank<2>>{{0, 0}, {0, 0}});
}
#if !(defined(_WIN32) && defined(KOKKOS_ENABLE_CUDA))
TEST(TEST_CATEGORY, occupancy_control) {
test_prefer_desired_occupancy(DummyPolicy<TEST_EXECSPACE>{});
test_prefer_desired_occupancy(Kokkos::RangePolicy<TEST_EXECSPACE>(0, 0));
test_prefer_desired_occupancy(
Kokkos::TeamPolicy<TEST_EXECSPACE>{0, Kokkos::AUTO});
test_prefer_desired_occupancy(
Kokkos::MDRangePolicy<TEST_EXECSPACE, Kokkos::Rank<2>>{{0, 0}, {0, 0}});
}
#endif
} // namespace

0 comments on commit 26060fe

Please sign in to comment.