Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7054e1b
Beginning of PythonTorchForce
peastman Apr 23, 2026
781e643
Python API
peastman Apr 25, 2026
ccef319
OpenCL platform
peastman Apr 27, 2026
69d8e7e
Code simplification
peastman Apr 27, 2026
d505b2f
Start of CUDA platform
peastman Apr 29, 2026
4cd3997
Avoid copying data between host and device
peastman Apr 29, 2026
67e46be
Documentation
peastman Apr 30, 2026
984e3af
Use common implementation for HIP
peastman Jun 18, 2026
f576621
Fixed a memory error
peastman Jun 18, 2026
3c2f3cf
Use newer version of setup-miniconda
peastman Jun 18, 2026
a5abced
Work with newer version of pytest
peastman Jun 19, 2026
6312f21
Fix name of environment file
peastman Jun 19, 2026
933cf21
Update setup-miniconda version in another workflow
peastman Jun 19, 2026
127aece
Update CI to newer package versions
peastman Jun 19, 2026
49369db
Newer version of cuda-toolkit action
peastman Jun 19, 2026
603e4a8
Try a different CUDA version
peastman Jun 19, 2026
b5ddd86
Use cuda-version instead of cudatoolkit
peastman Jun 19, 2026
a0cb6d0
Pytorch 2.12 requires newer CUDA
peastman Jun 19, 2026
3df60fe
Fix nvcc version
peastman Jun 19, 2026
f66bf87
Remove nvcc conda package
peastman Jun 19, 2026
231a0e0
Debugging
peastman Jun 19, 2026
4cdc87d
Debugging
peastman Jun 19, 2026
80ae712
Debugging
peastman Jun 19, 2026
6dd5a2d
Debugging
peastman Jun 19, 2026
add1ec7
Debugging
peastman Jun 19, 2026
039c71e
Removed an obsolete test
peastman Jun 19, 2026
44498e9
Changes based on suggestions
peastman Jun 24, 2026
452dac0
Use Intel OpenCL instead of pocl
peastman Jun 24, 2026
b1b5296
Fixed path
peastman Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
fail-fast: false
matrix:
include:
- name: Linux (CUDA 11.8, Python 3.10, PyTorch 2.1)
- name: Linux (CUDA 13.0, Python 3.14, PyTorch 2.12)
os: ubuntu-22.04
cuda-version: "11.8.0"
cuda-version: "13.0"
gcc-version: "10.3.*"
nvcc-version: "11.8"
python-version: "3.10"
pytorch-version: "2.1.*"
nvcc-version: "13.0"
python-version: "3.14"
pytorch-version: "2.12.*"
opencl: true

- name: MacOS ARM (Python 3.11, PyTorch 2.4)
os: macos-latest
Expand All @@ -37,27 +38,34 @@ jobs:
nvcc-version: ""
python-version: "3.11"
pytorch-version: "2.4.*"
opencl: false

- name: MacOS Intel (Python 3.11, PyTorch 2.4)
os: macos-13
- name: MacOS Intel (Python 3.13, PyTorch 2.5)
Comment thread
epretti marked this conversation as resolved.
os: macos-15-intel
cuda-version: ""
gcc-version: ""
nvcc-version: ""
python-version: "3.11"
pytorch-version: "2.4.*"
python-version: "3.13"
pytorch-version: "2.5.*"
opencl: false


steps:
- name: "Check out"
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.35
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda-version }}
cuda: ${{ matrix.cuda-version }}.0
linux-local-args: '["--toolkit", "--override"]'
if: startsWith(matrix.os, 'ubuntu')

- name: "Install OpenCL on Ubuntu (if needed)"
if: matrix.opencl == true
run: source devtools/scripts/install_intel_opencl.sh

- name: Manage disk space
if: startsWith(matrix.os, 'ubuntu')
uses: jlumbroso/free-disk-space@main
Expand All @@ -78,7 +86,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
Expand Down Expand Up @@ -111,8 +119,8 @@ jobs:
-DOPENMM_DIR=${CONDA_PREFIX} \
-DTorch_DIR=${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/share/cmake/Torch \
-DNN_BUILD_OPENCL_LIB=ON \
-DOPENCL_INCLUDE_DIR=${CONDA_PREFIX}/include \
-DOPENCL_LIBRARY=${CONDA_PREFIX}/lib/libOpenCL${SHLIB_EXT}
-DCUDAToolkit_ROOT="${{steps.cuda-toolkit.outputs.CUDA_PATH}}" \
-DCMAKE_CUDA_COMPILER="${{steps.cuda-toolkit.outputs.CUDA_PATH}}/bin/nvcc"

- name: "Build"
shell: bash -l {0}
Expand All @@ -132,11 +140,17 @@ jobs:
run: |
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib/python${{ matrix.python-version }}/site-packages/torch/lib:${LD_LIBRARY_PATH}"
cd build
if [[ ${{ matrix.opencl }} == true ]]; then
source /opt/intel/oneapi/setvars.sh
fi
ctest --output-on-failure --exclude-regex "TestCuda|TestOpenCL"

- 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}"
cd python/tests
if [[ ${{ matrix.opencl }} == true ]]; then
source /opt/intel/oneapi/setvars.sh
fi
pytest --verbose Test*
2 changes: 1 addition & 1 deletion .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: "Install dependencies with Mamba"
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v4
with:
activate-environment: test
environment-file: devtools/conda-envs/test-tutorials.yml
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# 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.5)
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)

# 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")
Expand Down Expand Up @@ -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)
Expand Down
Loading
Loading