Unverified Commit 66064fac authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

CI build for HIP (#4646)

* CI build for HIP

* Removed some unneeded dependencies

* Fix test for which libraries are present
parent e7d78e5f
...@@ -30,6 +30,7 @@ jobs: ...@@ -30,6 +30,7 @@ jobs:
include: include:
- name: Linux CUDA 12.4 - name: Linux CUDA 12.4
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11" python-version: "3.11"
cuda-version: "12.4" cuda-version: "12.4"
OPENCL: false OPENCL: false
...@@ -50,6 +51,7 @@ jobs: ...@@ -50,6 +51,7 @@ jobs:
- name: Linux CUDA 11.8 - name: Linux CUDA 11.8
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11" python-version: "3.11"
OPENCL: false OPENCL: false
cuda-version: "11.8" cuda-version: "11.8"
...@@ -70,6 +72,7 @@ jobs: ...@@ -70,6 +72,7 @@ jobs:
- name: Linux AMD OpenCL - name: Linux AMD OpenCL
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11" python-version: "3.11"
OPENCL: true OPENCL: true
cuda-version: "" cuda-version: ""
...@@ -88,8 +91,24 @@ jobs: ...@@ -88,8 +91,24 @@ jobs:
-DOPENCL_INCLUDE_DIR=${GITHUB_WORKSPACE}/AMDAPPSDK/include \ -DOPENCL_INCLUDE_DIR=${GITHUB_WORKSPACE}/AMDAPPSDK/include \
-DOPENCL_LIBRARY=${GITHUB_WORKSPACE}/AMDAPPSDK/lib/x86_64/libOpenCL.so \ -DOPENCL_LIBRARY=${GITHUB_WORKSPACE}/AMDAPPSDK/lib/x86_64/libOpenCL.so \
- name: Linux HIP
os: ubuntu-latest
env: ubuntu-latest-hip
python-version: "3.11"
OPENCL: false
CMAKE_FLAGS: |
-DOPENMM_BUILD_HIP_LIB=ON \
-DOPENMM_BUILD_HIP_TESTS=OFF \
-DOPENMM_BUILD_CPU_LIB=OFF \
-DOPENMM_BUILD_PYTHON_WRAPPERS=OFF \
-DOPENMM_BUILD_REFERENCE_TESTS=OFF \
-DOPENMM_BUILD_SERIALIZATION_TESTS=OFF \
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \
-DOPENMM_BUILD_EXAMPLES=OFF
- name: Linux CPU Python 3.11 with static lib - name: Linux CPU Python 3.11 with static lib
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11" python-version: "3.11"
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
...@@ -103,6 +122,7 @@ jobs: ...@@ -103,6 +122,7 @@ jobs:
- name: Linux CPU Python 3.11 with condaforge compilers - name: Linux CPU Python 3.11 with condaforge compilers
python-version: "3.11" python-version: "3.11"
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
compilers: conda-forge compilers: conda-forge
...@@ -113,6 +133,7 @@ jobs: ...@@ -113,6 +133,7 @@ jobs:
- name: Linux CPU Python 3.9 - name: Linux CPU Python 3.9
python-version: "3.9" python-version: "3.9"
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -122,6 +143,7 @@ jobs: ...@@ -122,6 +143,7 @@ jobs:
- name: Linux CPU Python 3.11 - name: Linux CPU Python 3.11
python-version: "3.11" python-version: "3.11"
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-latest
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -131,6 +153,7 @@ jobs: ...@@ -131,6 +153,7 @@ jobs:
- name: Linux CPU Pypy - name: Linux CPU Pypy
python-version: "pypy" python-version: "pypy"
os: ubuntu-latest os: ubuntu-latest
env: ubuntu-pypy
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -140,6 +163,7 @@ jobs: ...@@ -140,6 +163,7 @@ jobs:
- name: MacOS Intel Python 3.11 - name: MacOS Intel Python 3.11
python-version: "3.11" python-version: "3.11"
os: macos-13 os: macos-13
env: macos
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -149,6 +173,7 @@ jobs: ...@@ -149,6 +173,7 @@ jobs:
- name: MacOS ARM Python 3.11 - name: MacOS ARM Python 3.11
python-version: "3.11" python-version: "3.11"
os: macos-latest os: macos-latest
env: macos
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -164,7 +189,7 @@ jobs: ...@@ -164,7 +189,7 @@ jobs:
if: matrix.python-version == 'pypy' if: matrix.python-version == 'pypy'
with: with:
activate-environment: build activate-environment: build
environment-file: devtools/ci/gh-actions/conda-envs/build-ubuntu-pypy.yml environment-file: devtools/ci/gh-actions/conda-envs/build-${{ matrix.env }}.yml
auto-activate-base: false auto-activate-base: false
miniforge-variant: Mambaforge-pypy3 miniforge-variant: Mambaforge-pypy3
use-mamba: true use-mamba: true
...@@ -175,7 +200,7 @@ jobs: ...@@ -175,7 +200,7 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
activate-environment: build activate-environment: build
environment-file: devtools/ci/gh-actions/conda-envs/build-${{ matrix.os }}.yml environment-file: devtools/ci/gh-actions/conda-envs/build-${{ matrix.env }}.yml
auto-activate-base: false auto-activate-base: false
miniforge-variant: Mambaforge miniforge-variant: Mambaforge
use-mamba: true use-mamba: true
...@@ -265,6 +290,9 @@ jobs: ...@@ -265,6 +290,9 @@ jobs:
# OpenCL should also be there for CUDA and, well, OpenCL # OpenCL should also be there for CUDA and, well, OpenCL
if [[ "${{ matrix.cuda-version }}" != "" || ${{ matrix.OPENCL }} == true ]]; then if [[ "${{ matrix.cuda-version }}" != "" || ${{ matrix.OPENCL }} == true ]]; then
test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMOpenCL.$SHLIB test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMOpenCL.$SHLIB
# Check for HIP plugin
elif [[ ${{ matrix.env }} == *hip ]]; then
test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMHIP.$SHLIB
# CPU builds should provide both CPU and PME # CPU builds should provide both CPU and PME
else else
test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMCPU.$SHLIB test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMCPU.$SHLIB
......
name: build name: build
channels: channels:
- conda-forge - conda-forge
- bioconda
dependencies: dependencies:
# build # build
- cmake - cmake
- make
- ccache - ccache
- sysroot_linux-64 2.17
# host # host
- python - python
- cython
- swig
- numpy
- doxygen 1.8.14 - doxygen 1.8.14
# test - hip-devel
- pytest - hipcc
- pytest-xdist - rocm-cmake
- pytest-timeout - rocm-device-libs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment