From 2fa0462f5354b3401f53f05a98fff626464efb61 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 10:41:49 -0800 Subject: [PATCH 01/25] CI for Windows --- .github/workflows/CI.yml | 93 ++++++++++++++++++++++++++ devtools/conda-envs/windows-latest.yml | 16 +++++ 2 files changed, 109 insertions(+) create mode 100644 devtools/conda-envs/windows-latest.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c8b3b64f..e5020a10 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -140,3 +140,96 @@ jobs: export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}" cd python/tests pytest --verbose Test* + + + windows: + runs-on: ${{ matrix.os }} + name: ${{ matrix.name }} + strategy: + fail-fast: false + matrix: + include: + - name: Windows (CUDA 12.5, Python 3.12, PyTorch 2.5) + os: windows-latest + cuda-version: "12.5.0" + nvcc-version: "12.5" + python-version: "3.12" + pytorch-version: "2.5.*" + + steps: + - name: "Check out" + uses: actions/checkout@v2 + + - name: "Install CUDA Toolkit" + uses: Jimver/cuda-toolkit@v0.2.16 + id: cuda-toolkit + with: + cuda: ${{ matrix.cuda-version }} + method: 'network' + sub-packages: '["nvcc", "nvrtc", "nvrtc_dev", "cufft", "cufft_dev", "opencl", "cudart", "cuda_profiler_api"]' + + - name: "Update the conda enviroment file" + uses: cschleiden/replace-tokens@v1 + with: + tokenPrefix: '@' + tokenSuffix: '@' + files: devtools/conda-envs/build-${{ matrix.os }}.yml + env: + PYTORCH_VERSION: ${{ matrix.pytorch-version }} + + - uses: conda-incubator/setup-miniconda@v2 + name: "Install dependencies with Mamba" + with: + activate-environment: build + environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml + miniforge-variant: Miniforge3 + use-mamba: true + python-version: ${{ matrix.python-version }} + env: + # Override the CUDA detection as the CI hosts don't have NVIDIA drivers + CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc-version }} + + - name: "List conda packages" + shell: cmd /C call {0} + run: conda list + + - name: "Configure" + shell: cmd /C call {0} + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + mkdir build + cd build + for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v + cmake -G "NMake Makefiles JOM" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^ + -DOPENMM_DIR=%CONDA_PREFIX% ^ + -DTorch_DIR=%SITE_PACKAGES%/torch/share/cmake/Torch ^ + -DNN_BUILD_OPENCL_LIB=ON ^ + -DOPENCL_INCLUDE_DIR="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/include" ^ + -DOPENCL_LIBRARY="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/lib/x64/OpenCL.lib" ^ + + - name: "Build" + shell: cmd /C call {0} + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + cd build + jom -j 4 install + jom -j 4 PythonInstall + + - name: "List plugins" + shell: cmd /C call {0} + run: | + python -c "import openmm as mm; print('---Loaded---', *mm.pluginLoadedLibNames, '---Failed---', *mm.Platform.getPluginLoadFailures(), sep='\n')" + + - name: "Run C++ test" + shell: cmd /C call {0} + run: | + cd build + ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" + + - name: "Run Python test" + shell: cmd /C call {0} + run: | + cd python/tests + pytest --verbose Test* diff --git a/devtools/conda-envs/windows-latest.yml b/devtools/conda-envs/windows-latest.yml new file mode 100644 index 00000000..e53aada4 --- /dev/null +++ b/devtools/conda-envs/windows-latest.yml @@ -0,0 +1,16 @@ +name: build +channels: +- conda-forge +dependencies: +- jom +- cmake +- ccache +- m2-coreutils +- python +- cython +- swig +- openmm >=8.2 +- nnpops +- pytorch-gpu @PYTORCH_VERSION@ +- torchani +- pytest From b4a449d16b25d23274d0b16a00c680964f9ada4a Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 10:49:16 -0800 Subject: [PATCH 02/25] Fixed filename --- .../conda-envs/{windows-latest.yml => build-windows-latest.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename devtools/conda-envs/{windows-latest.yml => build-windows-latest.yml} (100%) diff --git a/devtools/conda-envs/windows-latest.yml b/devtools/conda-envs/build-windows-latest.yml similarity index 100% rename from devtools/conda-envs/windows-latest.yml rename to devtools/conda-envs/build-windows-latest.yml From 128ac15ae5e78d26a6fe9fee7056017c92dbbaf5 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 11:17:23 -0800 Subject: [PATCH 03/25] There are no nnpops packages for Windows --- devtools/conda-envs/build-windows-latest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/devtools/conda-envs/build-windows-latest.yml b/devtools/conda-envs/build-windows-latest.yml index e53aada4..d4bdacc2 100644 --- a/devtools/conda-envs/build-windows-latest.yml +++ b/devtools/conda-envs/build-windows-latest.yml @@ -10,7 +10,6 @@ dependencies: - cython - swig - openmm >=8.2 -- nnpops - pytorch-gpu @PYTORCH_VERSION@ - torchani - pytest From 7b26ee0e058983cf73e750300fa4c14d0626647b Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 11:29:01 -0800 Subject: [PATCH 04/25] Fixed cmake command --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e5020a10..f959731a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -200,14 +200,14 @@ jobs: mkdir build cd build for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v - cmake -G "NMake Makefiles JOM" ^ + cmake .. -G "NMake Makefiles JOM" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^ -DOPENMM_DIR=%CONDA_PREFIX% ^ -DTorch_DIR=%SITE_PACKAGES%/torch/share/cmake/Torch ^ -DNN_BUILD_OPENCL_LIB=ON ^ -DOPENCL_INCLUDE_DIR="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/include" ^ - -DOPENCL_LIBRARY="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/lib/x64/OpenCL.lib" ^ + -DOPENCL_LIBRARY="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/lib/x64/OpenCL.lib" - name: "Build" shell: cmd /C call {0} From 54f0926dd7305b35950b1f7f02683bc13d104fbc Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 11:51:57 -0800 Subject: [PATCH 05/25] Newer method of finding CUDA libraries --- CMakeLists.txt | 8 ++++---- platforms/cuda/CMakeLists.txt | 9 +-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75095427..11666d20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,12 +139,12 @@ IF(NN_BUILD_OPENCL_LIB) ADD_SUBDIRECTORY(platforms/opencl) ENDIF(NN_BUILD_OPENCL_LIB) -FIND_PACKAGE(CUDA QUIET) -IF(CUDA_FOUND) +FIND_PACKAGE(CUDAToolkit QUIET) +IF(CUDAToolkit_FOUND) SET(NN_BUILD_CUDA_LIB ON CACHE BOOL "Build implementation for CUDA") -ELSE(CUDA_FOUND) +ELSE(CUDAToolkit_FOUND) SET(NN_BUILD_CUDA_LIB OFF CACHE BOOL "Build implementation for CUDA") -ENDIF(CUDA_FOUND) +ENDIF(CUDAToolkit_FOUND) IF(NN_BUILD_CUDA_LIB) ADD_SUBDIRECTORY(platforms/cuda) ENDIF(NN_BUILD_CUDA_LIB) diff --git a/platforms/cuda/CMakeLists.txt b/platforms/cuda/CMakeLists.txt index 0eb9e831..030eecca 100644 --- a/platforms/cuda/CMakeLists.txt +++ b/platforms/cuda/CMakeLists.txt @@ -58,14 +58,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CUDA_KERNELS_CPP} ${CUDA_KERNELS_H} SET_SOURCE_FILES_PROPERTIES(${CUDA_KERNELS_CPP} ${CUDA_KERNELS_H} PROPERTIES GENERATED TRUE) ADD_LIBRARY(${SHARED_TARGET} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_INCLUDE_FILES}) -TARGET_LINK_LIBRARIES(${SHARED_TARGET} ${CUDA_LIBRARIES}) -IF(WIN32) - FIND_LIBRARY(CUDA_DRIVER_LIBRARY cuda HINTS ${CUDA_DRIVER_LIBRARY_PATH}) - IF(NOT CUDA_DRIVER_LIBRARY) - MESSAGE(FATAL_ERROR "Could not find CUDA driver library") - ENDIF() - TARGET_LINK_LIBRARIES(${SHARED_TARGET} ${CUDA_DRIVER_LIBRARY}) -ENDIF(WIN32) +TARGET_LINK_LIBRARIES(${SHARED_TARGET} CUDA::cuda_driver) TARGET_LINK_LIBRARIES(${SHARED_TARGET} OpenMM) TARGET_LINK_LIBRARIES(${SHARED_TARGET} OpenMMCUDA) TARGET_LINK_LIBRARIES(${SHARED_TARGET} ${NN_LIBRARY_NAME}) From 195a0e9bd2ec513a41776eac19aaffefb2f1ed92 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 12:17:22 -0800 Subject: [PATCH 06/25] Workaround for pytorch error --- CMakeLists.txt | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11666d20..f64fc765 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ LINK_DIRECTORIES("${OPENMM_DIR}/lib" "${OPENMM_DIR}/lib/plugins") # We need to know where LibTorch is installed so we can access the headers and libraries. SET(PYTORCH_DIR "" CACHE PATH "Where the PyTorch C++ API is installed") SET(CMAKE_PREFIX_PATH "${PYTORCH_DIR}") -FIND_PACKAGE(Torch REQUIRED) # Specify the C++ version we are building for. SET (CMAKE_CXX_STANDARD 17) @@ -84,6 +83,30 @@ FOREACH(subdir ${NN_PLUGIN_SOURCE_SUBDIRS}) INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/include) ENDFOREACH(subdir) +# The following is taken from https://discuss.pytorch.org/t/failed-to-find-nvtoolsext/179635. +# CUDA 12 changed nvToolsExt from a library to just a header. This broke compiling against +# libtorch. Almost two years later, they still haven't fixed it. This is a workaround. + +FIND_PACKAGE(CUDAToolkit QUIET) +if( + PYTORCH_VERSION VERSION_GREATER_EQUAL 2.5.0 AND + PYTORCH_CUDA_VERSION VERSION_GREATER_EQUAL 12 +) + message(STATUS "PyTorch NVTX headers workaround: Yes") + # only do this if nvToolsExt is not defined and CUDA::nvtx3 exists + if(NOT TARGET CUDA::nvToolsExt AND TARGET CUDA::nvtx3) + add_library(CUDA::nvToolsExt INTERFACE IMPORTED) + # ensure that PyTorch is told to use NVTX3 headers + target_compile_definitions( + CUDA::nvToolsExt INTERFACE + TORCH_CUDA_USE_NVTX3 + ) + target_link_libraries(CUDA::nvToolsExt INTERFACE CUDA::nvtx3) + endif() +else() + message(STATUS "PyTorch NVTX headers workaround: No") +endif()FIND_PACKAGE(Torch REQUIRED) + # Create the library. ADD_LIBRARY(${SHARED_NN_TARGET} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_INCLUDE_FILES}) @@ -139,7 +162,6 @@ IF(NN_BUILD_OPENCL_LIB) ADD_SUBDIRECTORY(platforms/opencl) ENDIF(NN_BUILD_OPENCL_LIB) -FIND_PACKAGE(CUDAToolkit QUIET) IF(CUDAToolkit_FOUND) SET(NN_BUILD_CUDA_LIB ON CACHE BOOL "Build implementation for CUDA") ELSE(CUDAToolkit_FOUND) From eeb1af8897cb130ce7bcf4a0772ef383cac24edb Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 12:18:27 -0800 Subject: [PATCH 07/25] Fixed typo --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f64fc765..4f5f81d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,8 @@ if( endif() else() message(STATUS "PyTorch NVTX headers workaround: No") -endif()FIND_PACKAGE(Torch REQUIRED) +endif() +FIND_PACKAGE(Torch REQUIRED) # Create the library. From cccdf46097528dc8c0f27a219b609c7e9ad1ea55 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 12:36:43 -0800 Subject: [PATCH 08/25] Debugging --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f5f81d8..60e8b89c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,10 +88,7 @@ ENDFOREACH(subdir) # libtorch. Almost two years later, they still haven't fixed it. This is a workaround. FIND_PACKAGE(CUDAToolkit QUIET) -if( - PYTORCH_VERSION VERSION_GREATER_EQUAL 2.5.0 AND - PYTORCH_CUDA_VERSION VERSION_GREATER_EQUAL 12 -) +if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12) message(STATUS "PyTorch NVTX headers workaround: Yes") # only do this if nvToolsExt is not defined and CUDA::nvtx3 exists if(NOT TARGET CUDA::nvToolsExt AND TARGET CUDA::nvtx3) From 6840be04807228f078814924b505c16be204769b Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 13:00:18 -0800 Subject: [PATCH 09/25] Debugging --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f959731a..6b0846b8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -197,6 +197,7 @@ jobs: shell: cmd /C call {0} run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + dir C:\Miniconda3\envs\build\lib mkdir build cd build for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v From 3da4fb68db19ecf10840f11fa2781ab1d28b9e41 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 13:33:30 -0800 Subject: [PATCH 10/25] Debugging --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6b0846b8..c15d5dd7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -197,14 +197,14 @@ jobs: shell: cmd /C call {0} run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - dir C:\Miniconda3\envs\build\lib + dir C:\Miniconda3\envs\build\Library\lib mkdir build cd build for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v cmake .. -G "NMake Makefiles JOM" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^ - -DOPENMM_DIR=%CONDA_PREFIX% ^ + -DOPENMM_DIR=%CONDA_PREFIX%/Library ^ -DTorch_DIR=%SITE_PACKAGES%/torch/share/cmake/Torch ^ -DNN_BUILD_OPENCL_LIB=ON ^ -DOPENCL_INCLUDE_DIR="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/include" ^ From 4408b1fd8ba2df7b8951367a090fde6c58ab7ff8 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 13:47:30 -0800 Subject: [PATCH 11/25] Fixed install location --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c15d5dd7..45bae9f1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -197,13 +197,12 @@ jobs: shell: cmd /C call {0} run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - dir C:\Miniconda3\envs\build\Library\lib mkdir build cd build for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v cmake .. -G "NMake Makefiles JOM" ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^ + -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%/Library ^ -DOPENMM_DIR=%CONDA_PREFIX%/Library ^ -DTorch_DIR=%SITE_PACKAGES%/torch/share/cmake/Torch ^ -DNN_BUILD_OPENCL_LIB=ON ^ From f99e1b0880d62f098b4e2605260b7a2cd34d83ce Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 7 Mar 2025 14:48:32 -0800 Subject: [PATCH 12/25] Debugging --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 45bae9f1..8a193f9a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -214,8 +214,10 @@ jobs: run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 cd build + type CMakeCache.txt jom -j 4 install jom -j 4 PythonInstall + dir C:\Miniconda3\envs\build\Library\lib\plugins - name: "List plugins" shell: cmd /C call {0} From 36a8a3df5476c2bbe77dc39f9a005290ab457329 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 10 Oct 2025 17:25:29 -0700 Subject: [PATCH 13/25] Debugging --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a193f9a..45bae9f1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -214,10 +214,8 @@ jobs: run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 cd build - type CMakeCache.txt jom -j 4 install jom -j 4 PythonInstall - dir C:\Miniconda3\envs\build\Library\lib\plugins - name: "List plugins" shell: cmd /C call {0} From 44769ba9a3ad131268b05d275545b31668520e34 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 10 Oct 2025 21:08:40 -0700 Subject: [PATCH 14/25] Debugging --- .github/workflows/CI.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 45bae9f1..481e7ad2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -83,8 +83,6 @@ jobs: with: activate-environment: build environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml - miniforge-variant: Miniforge3 - use-mamba: true python-version: ${{ matrix.python-version }} env: # Override the CUDA detection as the CI hosts don't have NVIDIA drivers @@ -182,8 +180,6 @@ jobs: with: activate-environment: build environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml - miniforge-variant: Miniforge3 - use-mamba: true python-version: ${{ matrix.python-version }} env: # Override the CUDA detection as the CI hosts don't have NVIDIA drivers From 5b2fab8ed94da551c6c2f65b0566a45893355712 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 10 Oct 2025 21:11:55 -0700 Subject: [PATCH 15/25] Debugging --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 481e7ad2..e8fa0fae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -84,6 +84,7 @@ jobs: activate-environment: build environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml python-version: ${{ matrix.python-version }} + auto-activate-base: false env: # Override the CUDA detection as the CI hosts don't have NVIDIA drivers CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc-version }} @@ -181,6 +182,7 @@ jobs: activate-environment: build environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml python-version: ${{ matrix.python-version }} + auto-activate-base: false env: # Override the CUDA detection as the CI hosts don't have NVIDIA drivers CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc-version }} From 8ec19b9024f78429045c65f1df7bf9ce0e2ce8c1 Mon Sep 17 00:00:00 2001 From: peastman Date: Sat, 11 Oct 2025 21:15:13 -0700 Subject: [PATCH 16/25] Debugging --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e8fa0fae..5435a680 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -85,6 +85,8 @@ jobs: environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml python-version: ${{ matrix.python-version }} auto-activate-base: false + miniforge-variant: Miniforge3 + use-mamba: true env: # Override the CUDA detection as the CI hosts don't have NVIDIA drivers CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc-version }} From 57543f117de0d6bad5a9105240c6e60ba759fc38 Mon Sep 17 00:00:00 2001 From: peastman Date: Sat, 11 Oct 2025 21:18:12 -0700 Subject: [PATCH 17/25] Debugging --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5435a680..9b888916 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -78,7 +78,7 @@ jobs: NVCC_VERSION: ${{ matrix.nvcc-version }} PYTORCH_VERSION: ${{ matrix.pytorch-version }} - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 name: "Install dependencies with Mamba" with: activate-environment: build From af807d61c13b77a8f77ece5c892ec65af9188cef Mon Sep 17 00:00:00 2001 From: peastman Date: Sun, 12 Oct 2025 11:00:50 -0700 Subject: [PATCH 18/25] Debugging --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9b888916..ffaf74d8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -226,6 +226,7 @@ jobs: shell: cmd /C call {0} run: | cd build + set PATH=%PATH%;%CONDA_PREFIX%\lib\python${{ matrix.python-version }}\site-packages\torch\lib ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" - name: "Run Python test" From 31f2ca73361504e3176d17cecc9f93e6a306e337 Mon Sep 17 00:00:00 2001 From: peastman Date: Sun, 12 Oct 2025 12:01:47 -0700 Subject: [PATCH 19/25] Debugging --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ffaf74d8..41906b44 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -227,6 +227,8 @@ jobs: run: | cd build set PATH=%PATH%;%CONDA_PREFIX%\lib\python${{ matrix.python-version }}\site-packages\torch\lib + set PATH + dir %CONDA_PREFIX%\lib\python${{ matrix.python-version }}\site-packages\torch\lib ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" - name: "Run Python test" From 56438b84b68ad5011d351e7dde7518146a18d86f Mon Sep 17 00:00:00 2001 From: peastman Date: Sun, 12 Oct 2025 21:12:19 -0700 Subject: [PATCH 20/25] Debugging --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 41906b44..b4839920 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -226,9 +226,10 @@ jobs: shell: cmd /C call {0} run: | cd build - set PATH=%PATH%;%CONDA_PREFIX%\lib\python${{ matrix.python-version }}\site-packages\torch\lib + for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v + dir %SITE_PACKAGES%\torch + set PATH=%PATH%;%SITE_PACKAGES%\torch\lib set PATH - dir %CONDA_PREFIX%\lib\python${{ matrix.python-version }}\site-packages\torch\lib ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" - name: "Run Python test" From f795780ba4bef79a6c96874b5f826da92b9e7a62 Mon Sep 17 00:00:00 2001 From: peastman Date: Sun, 12 Oct 2025 21:31:56 -0700 Subject: [PATCH 21/25] Debugging --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b4839920..c6707de0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -227,8 +227,9 @@ jobs: run: | cd build for /f "usebackq delims==" %%v in (`python -c "import site; print(site.getsitepackages()[-1])"`) do set SITE_PACKAGES=%%v - dir %SITE_PACKAGES%\torch - set PATH=%PATH%;%SITE_PACKAGES%\torch\lib + dir %SITE_PACKAGES%\torch\lib + dir %CONDA_PREFIX%\Library\lib + set PATH=%PATH%;%SITE_PACKAGES%\torch\lib;%CONDA_PREFIX%\Library\lib set PATH ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" From 6687c4950ef044559129c05a42452665efd22734 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 13 Oct 2025 11:09:18 -0700 Subject: [PATCH 22/25] Debugging --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c6707de0..891b0a09 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,10 +52,11 @@ jobs: uses: actions/checkout@v2 - name: "Install CUDA Toolkit on Linux (if needed)" - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.24 with: cuda: ${{ matrix.cuda-version }} linux-local-args: '["--toolkit", "--override"]' + use-github-cache: 'false' if: startsWith(matrix.os, 'ubuntu') - name: Manage disk space @@ -162,7 +163,7 @@ jobs: uses: actions/checkout@v2 - name: "Install CUDA Toolkit" - uses: Jimver/cuda-toolkit@v0.2.16 + uses: Jimver/cuda-toolkit@v0.2.24 id: cuda-toolkit with: cuda: ${{ matrix.cuda-version }} From b87380b914b2887bd7d1763916bc5ab4b78fe95c Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 13 Oct 2025 11:27:13 -0700 Subject: [PATCH 23/25] Debugging --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 891b0a09..0174b490 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -56,7 +56,6 @@ jobs: with: cuda: ${{ matrix.cuda-version }} linux-local-args: '["--toolkit", "--override"]' - use-github-cache: 'false' if: startsWith(matrix.os, 'ubuntu') - name: Manage disk space From 57b4ff103e942c262335a94b2e73ecd4e3f33e29 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 13 Oct 2025 11:56:30 -0700 Subject: [PATCH 24/25] Update to newer Python/PyTorch/CUDA versions --- .github/workflows/CI.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0174b490..d2d16d0d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,29 +22,29 @@ jobs: fail-fast: false matrix: include: - - name: Linux (CUDA 11.8, Python 3.10, PyTorch 2.1) + - name: Linux (CUDA 12.4, Python 3.13, PyTorch 2.8) os: ubuntu-22.04 - cuda-version: "11.8.0" + cuda-version: "12.4" gcc-version: "10.3.*" - nvcc-version: "11.8" - python-version: "3.10" - pytorch-version: "2.1.*" + nvcc-version: "12.4" + python-version: "3.13" + pytorch-version: "2.8.*" - - name: MacOS ARM (Python 3.11, PyTorch 2.4) + - name: MacOS ARM (Python 3.13, PyTorch 2.5) os: macos-latest cuda-version: "" gcc-version: "" nvcc-version: "" - python-version: "3.11" - pytorch-version: "2.4.*" + python-version: "3.13" + pytorch-version: "2.5.*" - - name: MacOS Intel (Python 3.11, PyTorch 2.4) + - name: MacOS Intel (Python 3.13, PyTorch 2.5) os: macos-13 cuda-version: "" gcc-version: "" nvcc-version: "" - python-version: "3.11" - pytorch-version: "2.4.*" + python-version: "3.13" + pytorch-version: "2.5.*" steps: From 720541deb316abaebf9da4e10ce743e60f4b11f3 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 13 Oct 2025 11:58:55 -0700 Subject: [PATCH 25/25] Debugging --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d2d16d0d..c98b8283 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,7 +24,7 @@ jobs: include: - name: Linux (CUDA 12.4, Python 3.13, PyTorch 2.8) os: ubuntu-22.04 - cuda-version: "12.4" + cuda-version: "12.5.0" gcc-version: "10.3.*" nvcc-version: "12.4" python-version: "3.13"