Skip to content

Commit 840fe42

Browse files
committed
Windows: (soft) Require CUDA >= 12.4 on windows for pyflamegpu support due to c++20 errors
1 parent 17d2f4e commit 840fe42

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Building FLAME GPU has the following requirements. There are also optional depen
6363

6464
+ [CMake](https://cmake.org/download/) `>= 3.25.2`
6565
+ [CUDA](https://developer.nvidia.com/cuda-downloads) `>= 12.0` and a [Compute Capability](https://developer.nvidia.com/cuda-gpus) `>= 5.0` NVIDIA GPU.
66-
+ FLAME GPU aims to support the 2 most recent major CUDA versions, currently 12.x and 13.x
66+
+ FLAME GPU aims to support the 2 most recent major CUDA versions, currently `12` and `13`
67+
+ On Windows, CUDA >= 12.4 is required for some optional features (python support)
6768
+ C++20 capable C++ compiler (host), compatible with the installed CUDA version
6869
+ [Microsoft Visual Studio 2022](https://visualstudio.microsoft.com/) (Windows)
6970
+ *Note:* Visual Studio must be installed before the CUDA toolkit is installed. See the [CUDA installation guide for Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) for more information.
@@ -76,6 +77,7 @@ Optionally:
7677
+ [Doxygen](http://www.doxygen.nl/) to build the documentation
7778
+ [Python](https://www.python.org/) `>= 3.8` for python integration
7879
+ With `setuptools`, `wheel`, `build` and optionally `venv` python packages installed
80+
+ On Windows, CUDA >= 12.4 is required for python integration
7981
+ [swig](http://www.swig.org/) `>= 4.1.0` for python integration (with c++20 support)
8082
+ Swig >= `4.1.0` will be automatically downloaded by CMake if not provided (if possible).
8183
+ Swig `4.2.0` is problematic

swig/python/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../ REALPATH
2323
# Ensure that the cuda toolkit package is available
2424
find_package(CUDAToolkit REQUIRED)
2525

26+
# If using MSVC and CUDA < 12.4, pyflamegpu may fail to build in c++20 mode. Please use a newer CUDA for pyflamegpu support.
27+
if (MSVC AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12.4)
28+
message(WARNING
29+
" pyflamegpu may fail to build with MSVC and CUDA < 12.4 due to compilation errors under c++20.\n"
30+
" \n"
31+
" Please upgrade to CUDA >= 12.4 for pyflamegpu on Windows.\n"
32+
" \n"
33+
" Alternatively, WSL can be used for pyflamegpu with CUDA < 12.4 on Windows (excluding interactive visualisation)"
34+
)
35+
endif()
36+
2637
# include CMake function to enable setting of warning suppressions
2738
include(${FLAMEGPU_ROOT}/cmake/warnings.cmake)
2839
# Get FLAMEGPU Version information

0 commit comments

Comments
 (0)