Skip to content

Commit

Permalink
Drop support for nvcc < 11.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Nov 17, 2023
1 parent aeafd03 commit 8c1ca8b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 33 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ jobs:
cxx: g++-9
- name: build-ubuntu-gcc10
cxx: g++-10
- name: build-ubuntu-gcc10-nvcc11.4
cxx: g++-10
cuda_url: https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run
- name: build-ubuntu-gcc10-nvcc11.5
cxx: g++-10
cuda_url: https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run
- name: build-ubuntu-gcc10-nvcc11.6
cxx: g++-10
cuda_url: https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following compilers are supported by LLAMA and tested as part of our CI:

| Linux | Windows | MacOS |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------|----------------------------------|
| g++ 9 - 13 </br> clang++ 11 - 17 </br> icpx (latest) </br> nvc++ 23.5 </br> nvcc 11.4 - 12.2 | Visual Studio 2022 </br> (latest on GitHub actions) | clang++ </br> (latest from brew) |
| g++ 9 - 13 </br> clang++ 11 - 17 </br> icpx (latest) </br> nvc++ 23.5 </br> nvcc 11.6 - 12.3 | Visual Studio 2022 </br> (latest on GitHub actions) | clang++ </br> (latest from brew) |


Single header
Expand Down
6 changes: 0 additions & 6 deletions examples/alpaka/nbody/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ if (NOT TARGET llama::llama)
find_package(llama REQUIRED)
endif()
find_package(alpaka 1.0 REQUIRED)
if (alpaka_ACC_GPU_CUDA_ENABLE AND (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") AND
(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.6))
# nvcc <= 11.5 chokes on `pis(tag::Pos{}, tag::X{})` inside `pPInteraction()` and segfauls
message(WARNING "nvcc < 11.6 fails to compile the alpaka n-body example, so it is disabled.")
return()
endif()
alpaka_add_executable(${PROJECT_NAME} nbody.cpp ../../common/Stopwatch.hpp)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_link_libraries(${PROJECT_NAME} PRIVATE llama::llama fmt::fmt alpaka::alpaka xsimd)
Expand Down
1 change: 0 additions & 1 deletion examples/cuda/nbody/nbody.cu
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ __device__ void pPInteraction(ParticleRefI& pi, ParticleRefJ pj)
template<int MappingSM, typename View>
__global__ void updateSM(View particles)
{
// FIXME: removing this lambda makes nvcc 11 segfault
auto sharedView = []
{
constexpr auto sharedMapping = []
Expand Down
4 changes: 1 addition & 3 deletions include/llama/Tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ namespace llama
const Tuple<Elements...>& tuple,
const Functor& functor)
{
// FIXME(bgruber): nvcc fails to compile
// Tuple{functor(get<Is>(tuple))...}
return Tuple<decltype(functor(std::declval<Elements>()))...>{functor(get<Is>(tuple))...};
return Tuple{functor(get<Is>(tuple))...};
}
} // namespace internal

Expand Down
26 changes: 10 additions & 16 deletions tests/mapping.Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#include "common.hpp"

#ifdef __NVCC__
# pragma message("LLAMA tree mapping tests disabled for nvcc. Too many compiler bugs.")
#else

namespace tree = llama::mapping::tree;

namespace tag
Expand Down Expand Up @@ -783,14 +779,14 @@ TEST_CASE("mapping.Tree")
using Mapping = tree::Mapping<ArrayExtents, Particle, decltype(treeOperationList)>;
const Mapping mapping(extents, treeOperationList);

# ifndef __NVCOMPILER
#ifndef __NVCOMPILER
auto raw = prettyPrintType(mapping.basicTree);
# ifdef _WIN32
# ifdef _WIN32
tree::internal::replaceAll(raw, "__int64", "long");
# endif
# ifdef _LIBCPP_VERSION
# endif
# ifdef _LIBCPP_VERSION
tree::internal::replaceAll(raw, "std::__1::", "std::");
# endif
# endif
const auto* const ref = R"(llama::mapping::tree::Node<
llama::NoName,
llama::Tuple<
Expand Down Expand Up @@ -927,15 +923,15 @@ TEST_CASE("mapping.Tree")
unsigned long
>)";
CHECK(raw == ref);
# endif
#endif

auto raw2 = prettyPrintType(mapping.resultTree);
# ifdef _WIN32
#ifdef _WIN32
tree::internal::replaceAll(raw2, "__int64", "long");
# endif
# ifdef _LIBCPP_VERSION
#endif
#ifdef _LIBCPP_VERSION
tree::internal::replaceAll(raw2, "std::__1::", "std::");
# endif
#endif
const auto* const ref2 = R"(llama::mapping::tree::Node<
llama::NoName,
llama::Tuple<
Expand Down Expand Up @@ -1097,5 +1093,3 @@ TEST_CASE("treeCoordToString")
CHECK(
tree::treeCoordToString(tree::createTreeCoord<llama::RecordCoord<3, 1>>(ai)) == "[ 6:0, 7:0, 8:3, 0:1, 0:0 ]");
}

#endif

0 comments on commit 8c1ca8b

Please sign in to comment.