From c18544ef0109e02521745f6512a0400f219a8333 Mon Sep 17 00:00:00 2001 From: Robert Chisholm Date: Wed, 25 Oct 2023 12:17:54 +0100 Subject: [PATCH] Fix compiler CUDA Disable examples. --- swig/conda/build.sh | 4 +--- swig/conda/conda_build_config.yaml | 6 ++++++ swig/conda/meta.yaml | 9 ++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 swig/conda/conda_build_config.yaml diff --git a/swig/conda/build.sh b/swig/conda/build.sh index b2d228b96..d53070673 100644 --- a/swig/conda/build.sh +++ b/swig/conda/build.sh @@ -28,9 +28,7 @@ echo "swig_dir: $swig_dir" mkdir -p build && cd build # Configure CMake -cmake .. -DCMAKE_BUILD_TYPE=Release -DFLAMEGPU_BUILD_PYTHON=ON -DFLAMEGPU_BUILD_PYTHON_VENV=OFF -DFLAMEGPU_BUILD_PYTHON_CONDA=ON $build_arch $swig_exe $swig_dir -DPython_EXECUTABLE="$PYTHON" -# CMAKE_ARGS broke find_jitify for me, so disabled it for now. Might need to tweak our CMake for it to be usable? -# $CMAKE_ARGS +cmake .. -DCMAKE_BUILD_TYPE=Release -DFLAMEGPU_BUILD_PYTHON=ON -DFLAMEGPU_BUILD_PYTHON_VENV=OFF -DFLAMEGPU_BUILD_ALL_EXAMPLES=OFF -DFLAMEGPU_BUILD_PYTHON_CONDA=ON $build_arch $swig_exe $swig_dir $CMAKE_ARGS -DPython3_EXECUTABLE="$PYTHON" # Build Python wheel cmake --build . --target pyflamegpu --parallel $build_threads diff --git a/swig/conda/conda_build_config.yaml b/swig/conda/conda_build_config.yaml new file mode 100644 index 000000000..544e1f51a --- /dev/null +++ b/swig/conda/conda_build_config.yaml @@ -0,0 +1,6 @@ +# https://docs.conda.io/projects/conda-build/en/3.21.x/resources/compiler-tools.html#using-your-customized-compiler-package-with-conda-build-3 +# https://github.com/rapidsai/cuml/blob/branch-23.12/conda/recipes/libcuml/conda_build_config.yaml +# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml +cuda_compiler: + #- nvcc # [win] # installs/uses cudatoolkit package? + - cuda-nvcc # [linux] # installs/uses cuda-toolkit package? \ No newline at end of file diff --git a/swig/conda/meta.yaml b/swig/conda/meta.yaml index d618a1882..ffe04983c 100644 --- a/swig/conda/meta.yaml +++ b/swig/conda/meta.yaml @@ -13,11 +13,14 @@ source: requirements: build: - {{ compiler('cxx') }} - # - {{ compiler('cuda') }} # This causes conda build to crash?? - - cuda-toolkit - - swig ==4.0.2 # CMake can't find this, but needs it to build swig from src? (>= does not work either), alt find where conda puts swig and pass path to CMake + - {{ compiler('cuda') }} + - cuda-cudart-dev # [linux] + - libcurand-dev # [linux] + - cuda-nvrtc-dev # [linux] + - swig ==4.0.2 # Have to manually direct swig to find this - cmake - python + - python-devtools - pip - setuptools >=40.8.0 # CMake can't find this when installed by conda - wheel