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:
include:
- name: Linux CUDA 12.4
os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11"
cuda-version: "12.4"
OPENCL: false
......@@ -50,6 +51,7 @@ jobs:
- name: Linux CUDA 11.8
os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11"
OPENCL: false
cuda-version: "11.8"
......@@ -70,6 +72,7 @@ jobs:
- name: Linux AMD OpenCL
os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11"
OPENCL: true
cuda-version: ""
......@@ -88,8 +91,24 @@ jobs:
-DOPENCL_INCLUDE_DIR=${GITHUB_WORKSPACE}/AMDAPPSDK/include \
-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
os: ubuntu-latest
env: ubuntu-latest
python-version: "3.11"
OPENCL: false
cuda-version: ""
......@@ -103,6 +122,7 @@ jobs:
- name: Linux CPU Python 3.11 with condaforge compilers
python-version: "3.11"
os: ubuntu-latest
env: ubuntu-latest
OPENCL: false
cuda-version: ""
compilers: conda-forge
......@@ -113,6 +133,7 @@ jobs:
- name: Linux CPU Python 3.9
python-version: "3.9"
os: ubuntu-latest
env: ubuntu-latest
OPENCL: false
cuda-version: ""
CMAKE_FLAGS: |
......@@ -122,6 +143,7 @@ jobs:
- name: Linux CPU Python 3.11
python-version: "3.11"
os: ubuntu-latest
env: ubuntu-latest
OPENCL: false
cuda-version: ""
CMAKE_FLAGS: |
......@@ -131,6 +153,7 @@ jobs:
- name: Linux CPU Pypy
python-version: "pypy"
os: ubuntu-latest
env: ubuntu-pypy
OPENCL: false
cuda-version: ""
CMAKE_FLAGS: |
......@@ -140,6 +163,7 @@ jobs:
- name: MacOS Intel Python 3.11
python-version: "3.11"
os: macos-13
env: macos
OPENCL: false
cuda-version: ""
CMAKE_FLAGS: |
......@@ -149,6 +173,7 @@ jobs:
- name: MacOS ARM Python 3.11
python-version: "3.11"
os: macos-latest
env: macos
OPENCL: false
cuda-version: ""
CMAKE_FLAGS: |
......@@ -164,7 +189,7 @@ jobs:
if: matrix.python-version == 'pypy'
with:
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
miniforge-variant: Mambaforge-pypy3
use-mamba: true
......@@ -175,7 +200,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
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
miniforge-variant: Mambaforge
use-mamba: true
......@@ -265,6 +290,9 @@ jobs:
# OpenCL should also be there for CUDA and, well, OpenCL
if [[ "${{ matrix.cuda-version }}" != "" || ${{ matrix.OPENCL }} == true ]]; then
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
else
test -f ${CONDA_PREFIX}/lib/plugins/libOpenMMCPU.$SHLIB
......
name: build
channels:
- conda-forge
- bioconda
dependencies:
# build
- cmake
- make
- ccache
- sysroot_linux-64 2.17
# host
- python
- cython
- swig
- numpy
- doxygen 1.8.14
# test
- pytest
- pytest-xdist
- pytest-timeout
- hip-devel
- hipcc
- rocm-cmake
- 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