From 77920026a8cc0225fa9400303d5accc51b7aee87 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 14:15:12 -0700 Subject: [PATCH 01/21] CI build for HIP --- .github/workflows/CI.yml | 18 +++++++++++++++--- .../conda-envs/build-ubuntu-22.04-hip.yml | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 devtools/conda-envs/build-ubuntu-22.04-hip.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c8b3b64f..68c6e220 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,14 +24,25 @@ jobs: include: - name: Linux (CUDA 11.8, Python 3.10, PyTorch 2.1) os: ubuntu-22.04 + env: ubuntu-22.04 cuda-version: "11.8.0" gcc-version: "10.3.*" nvcc-version: "11.8" python-version: "3.10" pytorch-version: "2.1.*" + - name: Linux (HIP, Python 3.14, PyTorch 2.12) + os: ubuntu-22.04 + env: ubuntu-22.04-hip + cuda-version: "" + gcc-version: "10.3.*" + nvcc-version: "" + python-version: "3.14" + pytorch-version: "2.12.*" + - name: MacOS ARM (Python 3.11, PyTorch 2.4) os: macos-latest + env: macos-latest cuda-version: "" gcc-version: "" nvcc-version: "" @@ -40,6 +51,7 @@ jobs: - name: MacOS Intel (Python 3.11, PyTorch 2.4) os: macos-13 + env: macos-13 cuda-version: "" gcc-version: "" nvcc-version: "" @@ -71,7 +83,7 @@ jobs: with: tokenPrefix: '@' tokenSuffix: '@' - files: devtools/conda-envs/build-${{ matrix.os }}.yml + files: devtools/conda-envs/build-${{ matrix.env }}.yml env: CUDATOOLKIT_VERSION: ${{ matrix.cuda-version }} GCC_VERSION: ${{ matrix.gcc-version }} @@ -82,7 +94,7 @@ jobs: name: "Install dependencies with Mamba" with: activate-environment: build - environment-file: devtools/conda-envs/build-${{ matrix.os }}.yml + environment-file: devtools/conda-envs/build-${{ matrix.env }}.yml miniforge-variant: Miniforge3 use-mamba: true python-version: ${{ matrix.python-version }} @@ -132,7 +144,7 @@ jobs: run: | export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}" cd build - ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL" + ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL|TestHip" - name: "Run Python test" shell: bash -l {0} diff --git a/devtools/conda-envs/build-ubuntu-22.04-hip.yml b/devtools/conda-envs/build-ubuntu-22.04-hip.yml new file mode 100644 index 00000000..61455950 --- /dev/null +++ b/devtools/conda-envs/build-ubuntu-22.04-hip.yml @@ -0,0 +1,19 @@ +name: build +channels: + - conda-forge +dependencies: + - cmake + - gxx_linux-64 @GCC_VERSION@ + - make + - openmm >=8.5 + - pip + - pytest + - python + - pytorch-gpu @PYTORCH_VERSION@ + - swig + - sysroot_linux-64 2.17 + - libxcrypt + - hip-devel + - hipcc + - rocm-cmake + - rocm-device-libs From aff4d5487e69cec42dd46bfdd8dea978283e603c Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 14:19:30 -0700 Subject: [PATCH 02/21] Don't install CUDA for HIP build --- .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 68c6e220..d6ccfbac 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -68,7 +68,7 @@ jobs: with: cuda: ${{ matrix.cuda-version }} linux-local-args: '["--toolkit", "--override"]' - if: startsWith(matrix.os, 'ubuntu') + if: matrix.cuda-version != '' - name: Manage disk space if: startsWith(matrix.os, 'ubuntu') From a76dedb85c69fdefb4c0f10231b0e47640de8e99 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 14:28:03 -0700 Subject: [PATCH 03/21] Try newer version of setup-miniconda --- .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 d6ccfbac..80e1d324 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,7 +90,7 @@ jobs: NVCC_VERSION: ${{ matrix.nvcc-version }} PYTORCH_VERSION: ${{ matrix.pytorch-version }} - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v4 name: "Install dependencies with Mamba" with: activate-environment: build From f50c03b5010b54f3c08d72860c1dda536f390e25 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 14:38:42 -0700 Subject: [PATCH 04/21] Install torch with pip --- devtools/conda-envs/build-ubuntu-22.04-hip.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/conda-envs/build-ubuntu-22.04-hip.yml b/devtools/conda-envs/build-ubuntu-22.04-hip.yml index 61455950..4b80bd21 100644 --- a/devtools/conda-envs/build-ubuntu-22.04-hip.yml +++ b/devtools/conda-envs/build-ubuntu-22.04-hip.yml @@ -9,7 +9,6 @@ dependencies: - pip - pytest - python - - pytorch-gpu @PYTORCH_VERSION@ - swig - sysroot_linux-64 2.17 - libxcrypt @@ -17,3 +16,6 @@ dependencies: - hipcc - rocm-cmake - rocm-device-libs + - pip: + - --index-url https://download.pytorch.org/whl/rocm7.2 + - torch \ No newline at end of file From 2a357b61e31ea86bf9515f0a32daec55e70c706f Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 15:50:05 -0700 Subject: [PATCH 05/21] Try installing HIP from AMD --- .github/workflows/CI.yml | 12 ++++++++++++ devtools/conda-envs/build-ubuntu-22.04-hip.yml | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 80e1d324..9a6740cd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,6 +26,7 @@ jobs: os: ubuntu-22.04 env: ubuntu-22.04 cuda-version: "11.8.0" + hip-version: "" gcc-version: "10.3.*" nvcc-version: "11.8" python-version: "3.10" @@ -35,6 +36,7 @@ jobs: os: ubuntu-22.04 env: ubuntu-22.04-hip cuda-version: "" + hip-version: "7" gcc-version: "10.3.*" nvcc-version: "" python-version: "3.14" @@ -44,6 +46,7 @@ jobs: os: macos-latest env: macos-latest cuda-version: "" + hip-version: "" gcc-version: "" nvcc-version: "" python-version: "3.11" @@ -53,6 +56,7 @@ jobs: os: macos-13 env: macos-13 cuda-version: "" + hip-version: "" gcc-version: "" nvcc-version: "" python-version: "3.11" @@ -74,6 +78,14 @@ jobs: if: startsWith(matrix.os, 'ubuntu') uses: jlumbroso/free-disk-space@main + - name: "Install HIP 7 on Linux (if needed)" + if: matrix.hip-version == '7' + run: | + yum install -y epel-release + yum install -y https://repo.radeon.com/amdgpu-install/7.2.4/el/9.7/amdgpu-install-7.2.4.70204-1.el9.noarch.rpm + echo "9.6" > /etc/dnf/vars/amdgpudistro + yum install -y rocm-device-libs hip-devel hip-runtime-amd hipcc + - name: "Install SDK on MacOS (if needed)" run: source devtools/scripts/install_macos_sdk.sh if: startsWith(matrix.os, 'macos') diff --git a/devtools/conda-envs/build-ubuntu-22.04-hip.yml b/devtools/conda-envs/build-ubuntu-22.04-hip.yml index 4b80bd21..47454fb4 100644 --- a/devtools/conda-envs/build-ubuntu-22.04-hip.yml +++ b/devtools/conda-envs/build-ubuntu-22.04-hip.yml @@ -12,10 +12,6 @@ dependencies: - swig - sysroot_linux-64 2.17 - libxcrypt - - hip-devel - - hipcc - - rocm-cmake - - rocm-device-libs - pip: - --index-url https://download.pytorch.org/whl/rocm7.2 - torch \ No newline at end of file From 487d43cc0d81a3f3a03e46302808bc9e90fa37c7 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 15:53:39 -0700 Subject: [PATCH 06/21] Install with apt --- .github/workflows/CI.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9a6740cd..f1d42ee4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,10 +81,9 @@ jobs: - name: "Install HIP 7 on Linux (if needed)" if: matrix.hip-version == '7' run: | - yum install -y epel-release - yum install -y https://repo.radeon.com/amdgpu-install/7.2.4/el/9.7/amdgpu-install-7.2.4.70204-1.el9.noarch.rpm - echo "9.6" > /etc/dnf/vars/amdgpudistro - yum install -y rocm-device-libs hip-devel hip-runtime-amd hipcc + wget https://repo.radeon.com/amdgpu-install/7.2.4/ubuntu/noble/amdgpu-install_7.2.4.70204-1_all.deb + apt install ./amdgpu-install_7.2.4.70204-1_all.deb + apt update - name: "Install SDK on MacOS (if needed)" run: source devtools/scripts/install_macos_sdk.sh From 390ef498963d849620167b493967bee70a2e7d50 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 15 Jun 2026 16:00:07 -0700 Subject: [PATCH 07/21] Use sudo --- .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 f1d42ee4..9bf36ccb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -82,8 +82,8 @@ jobs: if: matrix.hip-version == '7' run: | wget https://repo.radeon.com/amdgpu-install/7.2.4/ubuntu/noble/amdgpu-install_7.2.4.70204-1_all.deb - apt install ./amdgpu-install_7.2.4.70204-1_all.deb - apt update + sudo apt install ./amdgpu-install_7.2.4.70204-1_all.deb + sudo apt update - name: "Install SDK on MacOS (if needed)" run: source devtools/scripts/install_macos_sdk.sh From c3819a63315048ccebf0d95c3db5d7f784290487 Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 24 Jun 2026 15:00:03 -0700 Subject: [PATCH 08/21] Fix CMake warnings --- CMakeLists.txt | 5 +++-- python/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e06a866..f29fc301 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,8 @@ # The version number is set here and copied to anywhere it is needed. SET(OPENMM_TORCH_VERSION 1.5 CACHE STRING "The version of OpenMM-Torch that will be built." FORCE) -CMAKE_MINIMUM_REQUIRED(VERSION 3.12) +CMAKE_MINIMUM_REQUIRED(VERSION 3.31) +PROJECT(OpenMM-Torch) # We need to know where OpenMM is installed so we can access the headers and libraries. SET(OPENMM_DIR "/usr/local/openmm" CACHE PATH "Where OpenMM is installed") @@ -129,7 +130,7 @@ add_custom_target(CopyTestFiles ALL DEPENDS ${COPIED_TEST_FILES}) ADD_SUBDIRECTORY(platforms/reference) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") -FIND_PACKAGE(OpenCL QUIET) +FIND_PACKAGE(OPENCL QUIET) IF(OPENCL_FOUND) SET(NN_BUILD_OPENCL_LIB ON CACHE BOOL "Build implementation for OpenCL") ELSE(OPENCL_FOUND) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index d7675cdc..b88b9101 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -24,7 +24,7 @@ add_custom_target(PythonInstall DEPENDS "${WRAP_FILE}" "${CMAKE_CURRENT_SOURCE_ set(NN_PLUGIN_HEADER_DIR "${CMAKE_SOURCE_DIR}/openmmapi/include") set(NN_PLUGIN_LIBRARY_DIR "${CMAKE_BINARY_DIR}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py ${CMAKE_CURRENT_BINARY_DIR}/setup.py) -add_custom_command(TARGET PythonInstall +add_custom_command(TARGET PythonInstall POST_BUILD COMMAND "${PYTHON_EXECUTABLE}" -m pip install . WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) From 4b63c9fbe2f9cbedd96bb76a00b82a1edff349e9 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 6 Jul 2026 14:05:15 -0700 Subject: [PATCH 09/21] Debug installing HIP --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 93523f41..0d14887d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -91,6 +91,7 @@ jobs: wget https://repo.radeon.com/amdgpu-install/7.2.4/ubuntu/noble/amdgpu-install_7.2.4.70204-1_all.deb sudo apt install ./amdgpu-install_7.2.4.70204-1_all.deb sudo apt update + sudo apt install rocm - name: "Install SDK on MacOS (if needed)" run: source devtools/scripts/install_macos_sdk.sh From 5e6f7e4c415e5c7d5de8b0e69ffc310b1c638d30 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 6 Jul 2026 14:29:41 -0700 Subject: [PATCH 10/21] Try a newer version of Ubuntu --- .github/workflows/CI.yml | 8 ++++---- ...ld-ubuntu-22.04-hip.yml => build-ubuntu-24.04-hip.yml} | 0 .../{build-ubuntu-22.04.yml => build-ubuntu-24.04.yml} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename devtools/conda-envs/{build-ubuntu-22.04-hip.yml => build-ubuntu-24.04-hip.yml} (100%) rename devtools/conda-envs/{build-ubuntu-22.04.yml => build-ubuntu-24.04.yml} (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0d14887d..ba07e44a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,8 +23,8 @@ jobs: matrix: include: - name: Linux (CUDA 13.0, Python 3.14, PyTorch 2.12) - os: ubuntu-22.04 - env: ubuntu-22.04 + os: ubuntu-24.04 + env: ubuntu-24.04 cuda-version: "13.0" gcc-version: "10.3.*" nvcc-version: "13.0" @@ -33,8 +33,8 @@ jobs: opencl: true - name: Linux (HIP, Python 3.14, PyTorch 2.12) - os: ubuntu-22.04 - env: ubuntu-22.04-hip + os: ubuntu-24.04 + env: ubuntu-24.04-hip cuda-version: "" hip-version: "7" gcc-version: "10.3.*" diff --git a/devtools/conda-envs/build-ubuntu-22.04-hip.yml b/devtools/conda-envs/build-ubuntu-24.04-hip.yml similarity index 100% rename from devtools/conda-envs/build-ubuntu-22.04-hip.yml rename to devtools/conda-envs/build-ubuntu-24.04-hip.yml diff --git a/devtools/conda-envs/build-ubuntu-22.04.yml b/devtools/conda-envs/build-ubuntu-24.04.yml similarity index 100% rename from devtools/conda-envs/build-ubuntu-22.04.yml rename to devtools/conda-envs/build-ubuntu-24.04.yml From 920d72d542a3a47aa55329c345b5ee62e651805e Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 6 Jul 2026 15:57:57 -0700 Subject: [PATCH 11/21] Debugging --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ba07e44a..9f44bf2e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -135,6 +135,7 @@ jobs: if [[ ${{ matrix.os }} == macos-* ]]; then SHLIB_EXT=".dylib" fi + export PYTORCH_ROCM_ARCH=gfx1201 cmake .. \ -DCMAKE_BUILD_TYPE=Release \ From 3f0d4b3db1e2a97080ead0794e33047dc8ce4072 Mon Sep 17 00:00:00 2001 From: peastman Date: Tue, 7 Jul 2026 11:15:18 -0700 Subject: [PATCH 12/21] Debugging --- .github/workflows/CI.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9f44bf2e..44f0a3b6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -135,7 +135,10 @@ jobs: if [[ ${{ matrix.os }} == macos-* ]]; then SHLIB_EXT=".dylib" fi - export PYTORCH_ROCM_ARCH=gfx1201 + if [[ ${{ matrix.hip-version }} == 7 ]]; then + PYTORCH_ROCM_ARCH=gfx1201 + CXX=hipcc + fi cmake .. \ -DCMAKE_BUILD_TYPE=Release \ From ab5eb20cdafedd5c7b4220421812840370e7c655 Mon Sep 17 00:00:00 2001 From: peastman Date: Tue, 7 Jul 2026 11:32:06 -0700 Subject: [PATCH 13/21] Debugging --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 44f0a3b6..3d5f81c0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -135,9 +135,9 @@ jobs: if [[ ${{ matrix.os }} == macos-* ]]; then SHLIB_EXT=".dylib" fi - if [[ ${{ matrix.hip-version }} == 7 ]]; then - PYTORCH_ROCM_ARCH=gfx1201 - CXX=hipcc + if [[ ${{ matrix.env }} == *hip ]]; then + export PYTORCH_ROCM_ARCH=gfx1201 + export CXX=hipcc fi cmake .. \ From c5d61e85531bad04d16944a0ebcd453ebdf1db41 Mon Sep 17 00:00:00 2001 From: peastman Date: Tue, 7 Jul 2026 16:52:40 -0700 Subject: [PATCH 14/21] Try installing OpenMM with pip --- devtools/conda-envs/build-ubuntu-24.04-hip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/conda-envs/build-ubuntu-24.04-hip.yml b/devtools/conda-envs/build-ubuntu-24.04-hip.yml index 47454fb4..ed0369c1 100644 --- a/devtools/conda-envs/build-ubuntu-24.04-hip.yml +++ b/devtools/conda-envs/build-ubuntu-24.04-hip.yml @@ -5,7 +5,6 @@ dependencies: - cmake - gxx_linux-64 @GCC_VERSION@ - make - - openmm >=8.5 - pip - pytest - python @@ -14,4 +13,5 @@ dependencies: - libxcrypt - pip: - --index-url https://download.pytorch.org/whl/rocm7.2 + - openmm[hip7] >=8.5 - torch \ No newline at end of file From 6d26931d0b806e3ab0239668a9fbde7040bd8ff3 Mon Sep 17 00:00:00 2001 From: peastman Date: Tue, 7 Jul 2026 17:52:32 -0700 Subject: [PATCH 15/21] Debug installing pip packages --- devtools/conda-envs/build-ubuntu-24.04-hip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/conda-envs/build-ubuntu-24.04-hip.yml b/devtools/conda-envs/build-ubuntu-24.04-hip.yml index ed0369c1..ba86cacc 100644 --- a/devtools/conda-envs/build-ubuntu-24.04-hip.yml +++ b/devtools/conda-envs/build-ubuntu-24.04-hip.yml @@ -12,6 +12,6 @@ dependencies: - sysroot_linux-64 2.17 - libxcrypt - pip: - - --index-url https://download.pytorch.org/whl/rocm7.2 + - --extra-index-url https://download.pytorch.org/whl/rocm7.2 - openmm[hip7] >=8.5 - torch \ No newline at end of file From fe01d97ea65187a4a780064e6310688f1b95050e Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 15:23:18 -0700 Subject: [PATCH 16/21] Debugging --- .github/workflows/CI.yml | 6 +++--- devtools/conda-envs/build-macos-15-intel.yml | 5 +++-- devtools/conda-envs/build-macos-latest.yml | 5 +++-- devtools/conda-envs/build-ubuntu-24.04-hip.yml | 2 +- devtools/conda-envs/build-ubuntu-24.04.yml | 6 +++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d5f81c0..1b336228 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -142,9 +142,9 @@ jobs: cmake .. \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \ - -DOPENMM_DIR=${CONDA_PREFIX} \ - -DTorch_DIR=${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/share/cmake/Torch \ + -DCMAKE_INSTALL_PREFIX=${SITE_PACKAGES}/OpenMM.libs \ + -DOPENMM_DIR=${SITE_PACKAGES}/OpenMM.libs \ + -DTorch_DIR=${SITE_PACKAGES}/torch/share/cmake/Torch \ -DNN_BUILD_OPENCL_LIB=ON \ -DCUDAToolkit_ROOT="${{steps.cuda-toolkit.outputs.CUDA_PATH}}" \ -DCMAKE_CUDA_COMPILER="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/bin/nvcc" diff --git a/devtools/conda-envs/build-macos-15-intel.yml b/devtools/conda-envs/build-macos-15-intel.yml index 6fb479b6..5f406d96 100644 --- a/devtools/conda-envs/build-macos-15-intel.yml +++ b/devtools/conda-envs/build-macos-15-intel.yml @@ -5,9 +5,10 @@ dependencies: - cmake - compilers - make - - openmm >=8.2 - pip - pytest - python - - pytorch-cpu @PYTORCH_VERSION@ - swig +- pip: + - openmm >= 8.5 + - torch == @PYTORCH_VERSION@ diff --git a/devtools/conda-envs/build-macos-latest.yml b/devtools/conda-envs/build-macos-latest.yml index 6fb479b6..5f406d96 100644 --- a/devtools/conda-envs/build-macos-latest.yml +++ b/devtools/conda-envs/build-macos-latest.yml @@ -5,9 +5,10 @@ dependencies: - cmake - compilers - make - - openmm >=8.2 - pip - pytest - python - - pytorch-cpu @PYTORCH_VERSION@ - swig +- pip: + - openmm >= 8.5 + - torch == @PYTORCH_VERSION@ diff --git a/devtools/conda-envs/build-ubuntu-24.04-hip.yml b/devtools/conda-envs/build-ubuntu-24.04-hip.yml index ba86cacc..86de4eb3 100644 --- a/devtools/conda-envs/build-ubuntu-24.04-hip.yml +++ b/devtools/conda-envs/build-ubuntu-24.04-hip.yml @@ -14,4 +14,4 @@ dependencies: - pip: - --extra-index-url https://download.pytorch.org/whl/rocm7.2 - openmm[hip7] >=8.5 - - torch \ No newline at end of file + - torch == @PYTORCH_VERSION@ diff --git a/devtools/conda-envs/build-ubuntu-24.04.yml b/devtools/conda-envs/build-ubuntu-24.04.yml index 3582f3e3..16c12bd2 100644 --- a/devtools/conda-envs/build-ubuntu-24.04.yml +++ b/devtools/conda-envs/build-ubuntu-24.04.yml @@ -3,17 +3,17 @@ channels: - conda-forge dependencies: - cmake - - cuda-version @CUDATOOLKIT_VERSION@ - gxx_linux-64 @GCC_VERSION@ - make - nnpops - ocl-icd - - openmm >=8.1 - pip - pytest - python - - pytorch-gpu @PYTORCH_VERSION@ - swig - sysroot_linux-64 2.17 - torchani - libxcrypt +- pip: + - openmm[cuda13] >= 8.5 + - torch == @PYTORCH_VERSION@ From d105033dcb0ef6bd758e515fb4f90295e183d41e Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 15:31:46 -0700 Subject: [PATCH 17/21] Fixed syntax --- devtools/conda-envs/build-macos-15-intel.yml | 6 +++--- devtools/conda-envs/build-macos-latest.yml | 6 +++--- devtools/conda-envs/build-ubuntu-24.04.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/devtools/conda-envs/build-macos-15-intel.yml b/devtools/conda-envs/build-macos-15-intel.yml index 5f406d96..18877300 100644 --- a/devtools/conda-envs/build-macos-15-intel.yml +++ b/devtools/conda-envs/build-macos-15-intel.yml @@ -9,6 +9,6 @@ dependencies: - pytest - python - swig -- pip: - - openmm >= 8.5 - - torch == @PYTORCH_VERSION@ + - pip: + - openmm >= 8.5 + - torch == @PYTORCH_VERSION@ diff --git a/devtools/conda-envs/build-macos-latest.yml b/devtools/conda-envs/build-macos-latest.yml index 5f406d96..18877300 100644 --- a/devtools/conda-envs/build-macos-latest.yml +++ b/devtools/conda-envs/build-macos-latest.yml @@ -9,6 +9,6 @@ dependencies: - pytest - python - swig -- pip: - - openmm >= 8.5 - - torch == @PYTORCH_VERSION@ + - pip: + - openmm >= 8.5 + - torch == @PYTORCH_VERSION@ diff --git a/devtools/conda-envs/build-ubuntu-24.04.yml b/devtools/conda-envs/build-ubuntu-24.04.yml index 16c12bd2..db3c7efb 100644 --- a/devtools/conda-envs/build-ubuntu-24.04.yml +++ b/devtools/conda-envs/build-ubuntu-24.04.yml @@ -14,6 +14,6 @@ dependencies: - sysroot_linux-64 2.17 - torchani - libxcrypt -- pip: - - openmm[cuda13] >= 8.5 - - torch == @PYTORCH_VERSION@ + - pip: + - openmm[cuda13] >= 8.5 + - torch == @PYTORCH_VERSION@ From f0f85cc6bc7018b06e9a4abdc5d04c6d439d67f2 Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 15:38:28 -0700 Subject: [PATCH 18/21] Debugging --- .github/workflows/CI.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1b336228..9b75972c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,6 +139,10 @@ jobs: export PYTORCH_ROCM_ARCH=gfx1201 export CXX=hipcc fi + echo ${SITE_PACKAGES} + ls ${SITE_PACKAGES} + echo ${SITE_PACKAGES}/torch/share/cmake/Torch + ls ${SITE_PACKAGES}/torch/share/cmake/Torch cmake .. \ -DCMAKE_BUILD_TYPE=Release \ From 6111622d7d42b9aebf676cdd4d62c480852bece2 Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 15:41:17 -0700 Subject: [PATCH 19/21] Debugging --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9b75972c..45aa6119 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,6 +139,7 @@ jobs: export PYTORCH_ROCM_ARCH=gfx1201 export CXX=hipcc fi + export SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') echo ${SITE_PACKAGES} ls ${SITE_PACKAGES} echo ${SITE_PACKAGES}/torch/share/cmake/Torch From db3d066ba08386cbfbbf7ec5d2377dfe7386d233 Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 15:59:42 -0700 Subject: [PATCH 20/21] Remove Mac Intel build --- .github/workflows/CI.yml | 18 +----------------- devtools/conda-envs/build-macos-15-intel.yml | 14 -------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 devtools/conda-envs/build-macos-15-intel.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 45aa6119..108a8b02 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,6 +41,7 @@ jobs: nvcc-version: "" python-version: "3.14" pytorch-version: "2.12.*" + opencl: false - name: MacOS ARM (Python 3.11, PyTorch 2.4) os: macos-latest @@ -53,17 +54,6 @@ jobs: pytorch-version: "2.4.*" opencl: false - - name: MacOS Intel (Python 3.13, PyTorch 2.5) - os: macos-15-intel - env: macos-15-intel - cuda-version: "" - hip-version: "" - gcc-version: "" - nvcc-version: "" - python-version: "3.13" - pytorch-version: "2.5.*" - opencl: false - steps: - name: "Check out" @@ -130,7 +120,6 @@ jobs: run: | mkdir build cd build - SHLIB_EXT=".so" if [[ ${{ matrix.os }} == macos-* ]]; then SHLIB_EXT=".dylib" @@ -140,11 +129,6 @@ jobs: export CXX=hipcc fi export SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') - echo ${SITE_PACKAGES} - ls ${SITE_PACKAGES} - echo ${SITE_PACKAGES}/torch/share/cmake/Torch - ls ${SITE_PACKAGES}/torch/share/cmake/Torch - cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${SITE_PACKAGES}/OpenMM.libs \ diff --git a/devtools/conda-envs/build-macos-15-intel.yml b/devtools/conda-envs/build-macos-15-intel.yml deleted file mode 100644 index 18877300..00000000 --- a/devtools/conda-envs/build-macos-15-intel.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: build -channels: - - conda-forge -dependencies: - - cmake - - compilers - - make - - pip - - pytest - - python - - swig - - pip: - - openmm >= 8.5 - - torch == @PYTORCH_VERSION@ From a98a7d6b827a2b5511e3f0c38ee3b061b3fc7c40 Mon Sep 17 00:00:00 2001 From: peastman Date: Wed, 8 Jul 2026 16:42:38 -0700 Subject: [PATCH 21/21] Trying specifying library path differently --- .github/workflows/CI.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 108a8b02..8b0f5019 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -148,13 +148,15 @@ jobs: - name: "List plugins" shell: bash -l {0} run: | - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}" + export SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') + export LD_LIBRARY_PATH="${SITE_PACKAGES}/torch/lib:${SITE_PACKAGES}/OpenMM.libs/lib:${LD_LIBRARY_PATH}" python -c "import openmm as mm; print('---Loaded---', *mm.pluginLoadedLibNames, '---Failed---', *mm.Platform.getPluginLoadFailures(), sep='\n')" - name: "Run C++ test" shell: bash -l {0} run: | - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}" + export SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') + export LD_LIBRARY_PATH="${SITE_PACKAGES}/torch/lib:${SITE_PACKAGES}/OpenMM.libs/lib:${LD_LIBRARY_PATH}" cd build if [[ ${{ matrix.opencl }} == true ]]; then source /opt/intel/oneapi/setvars.sh @@ -164,7 +166,8 @@ jobs: - name: "Run Python test" shell: bash -l {0} run: | - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}" + export SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') + export LD_LIBRARY_PATH="${SITE_PACKAGES}/torch/lib:${SITE_PACKAGES}/OpenMM.libs/lib:${LD_LIBRARY_PATH}" cd python/tests if [[ ${{ matrix.opencl }} == true ]]; then source /opt/intel/oneapi/setvars.sh