From 85781396472291059df7868ee6fcd47e8fb18eee Mon Sep 17 00:00:00 2001 From: enwask Date: Tue, 22 Jul 2025 16:54:41 +0100 Subject: [PATCH 1/5] docker: Add free-threaded base --- docker/Dockerfile.amd | 24 +++++++++++++---- docker/Dockerfile.cpu | 16 +++++++---- docker/Dockerfile.devito | 17 +++++++++--- docker/Dockerfile.intel | 12 ++++++--- docker/Dockerfile.nogil | 58 ++++++++++++++++++++++++++++++++++++++++ docker/Dockerfile.nvidia | 14 +++++++--- 6 files changed, 120 insertions(+), 21 deletions(-) create mode 100644 docker/Dockerfile.nogil diff --git a/docker/Dockerfile.amd b/docker/Dockerfile.amd index 233b52e59a..da4bc3184e 100644 --- a/docker/Dockerfile.amd +++ b/docker/Dockerfile.amd @@ -4,20 +4,34 @@ ############################################################## ARG ROCM_VERSION=6.3.2 +ARG FROM_IMAGE=ubuntu:22.04 +FROM $base AS ubuntu-base FROM rocm/dev-ubuntu-22.04:${ROCM_VERSION}-complete AS sdk-base +ENV DEBIAN_FRONTEND=noninteractive + +# Base may be specified with the nogil base image to provide Python +COPY --from=ubuntu-base /opt /opt +ENV PATH="/opt/python3/bin:${PATH}" + ARG UCX_BRANCH="v1.16.0" ARG OMPI_BRANCH="v5.0.x" # Update and Install basic Linux development tools RUN rm /etc/apt/sources.list.d/* \ && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - dh-autoreconf python3-venv python3-dev python3-pip git \ + && apt-get install -y --no-install-recommends \ + dh-autoreconf git \ ca-certificates ssh make libtinfo* initramfs-tools libelf-dev \ wget build-essential autoconf automake libtool \ - pkg-config libnuma* gfortran flex hwloc cmake + pkg-config libnuma* gfortran flex hwloc cmake && \ + if [ ! -d "/opt/python3" ]; then \ + apt-get install -y --no-install-recommends \ + python3-venv python3-dev python3-pip; \ + else \ + echo "Using free-threaded Python build"; \ + fi; ENV ROCM_HOME=/opt/rocm\ UCX_HOME=/opt/ucx \ @@ -84,8 +98,8 @@ RUN rm -rf /tmp/ucx && rm -rf /tmp/ompi # Adding OpenMPI and UCX to Environment ENV PATH=$OMPI_HOME/bin:$UCX_HOME/bin:$PATH \ LD_LIBRARY_PATH=$OMPI_HOME/lib:$UCX_HOME/lib:$LD_LIBRARY_PATH \ - C_INCLUDE_PATH=$OMPI_HOME/include:$UCX_HOME/include:$C_INCLUDE_PATH \ - CPLUS_INCLUDE_PATH=$OMPI_HOME/include:$UCX_HOME/include:$CPLUS_INCLUDE_PATH \ + C_INCLUDE_PATH=$OMPI_HOME/include:$UCX_HOME/include:$C_INCLUDE_PATH \ + CPLUS_INCLUDE_PATH=$OMPI_HOME/include:$UCX_HOME/include:$CPLUS_INCLUDE_PATH \ CPATH=$OMPI_HOME/include:$UCX_HOME/include:$CPATH \ INCLUDE=$OMPI_HOME/include:$UCX_HOME/include:$INCLUDE \ PKG_CONFIG_PATH=$OMPI_HOME/lib/pkgconfig:$UCX_HOME/lib/pkgconfig:$PKG_CONFIG_PATH diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index 8f036badb9..7c3d490b07 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -4,16 +4,22 @@ # architectures using GCC compilers and OpenMPI. ############################################################## -# Base image -FROM ubuntu:22.04 AS base - +# Base image is either ubuntu or the nogil base +ARG FROM_IMAGE=ubuntu:22.04 ARG gcc="" +FROM $FROM_IMAGE AS base + ENV DEBIAN_FRONTEND=noninteractive -# Install python +# Install python, if not already present RUN apt-get update && \ - apt-get install -y software-properties-common dh-autoreconf python3-venv python3-dev python3-pip + apt-get install -y software-properties-common dh-autoreconf && \ + if [ ! -d "/opt/python3" ]; then \ + apt-get install -y -q python3-venv python3-dev python3-pip; \ + else \ + echo "Using free-threaded Python build"; \ + fi; # Install for basic base not containing it RUN apt-get install -y wget flex libnuma-dev hwloc curl cmake git \ diff --git a/docker/Dockerfile.devito b/docker/Dockerfile.devito index 51ef3140f0..3ca44e871f 100644 --- a/docker/Dockerfile.devito +++ b/docker/Dockerfile.devito @@ -11,14 +11,23 @@ FROM $base AS builder ARG USER_ID=1000 ARG GROUP_ID=1000 + ################## Install devito ############################################ ENV PIP_USE_PEP517=1 -# Install pip dependencies + +# Install pip dependencies RUN python3 -m venv /venv && \ - /venv/bin/pip install --no-cache-dir --upgrade pip wheel setuptools && \ - /venv/bin/pip install --no-cache-dir jupyter && \ - ln -fs /app/nvtop/build/src/nvtop /venv/bin/nvtop + /venv/bin/pip install --no-cache-dir --upgrade pip wheel setuptools +# Jupyter cannot yet be installed with a free-threaded Python build +# See https://github.com/jupyterlab/jupyterlab/issues/16915 +ARG base +RUN case "$base" in *nogil) \ + echo "Skipping jupyter installation for free-threaded build";; \ + *) \ + /venv/bin/pip install --no-cache-dir jupyter;; \ + esac; +RUN ln -fs /app/nvtop/build/src/nvtop /venv/bin/nvtop # Copy Devito ADD . /app/devito diff --git a/docker/Dockerfile.intel b/docker/Dockerfile.intel index e013fccc03..8b80ed102b 100644 --- a/docker/Dockerfile.intel +++ b/docker/Dockerfile.intel @@ -4,13 +4,19 @@ ############################################################## # Base image -FROM ubuntu:22.04 as base +ARG FROM_IMAGE=ubuntu:22.04 +FROM $FROM_IMAGE as base ENV DEBIAN_FRONTEND noninteractive -# Install python +# Install python, if not already present RUN apt-get update && \ - apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip + apt-get install -y dh-autoreconf && \ + if [ ! -d "/opt/python3" ]; then \ + apt-get install -y -q python3-venv python3-dev python3-pip; \ + else \ + echo "Using free-threaded Python build"; \ + fi; # Install for basic base not containing it RUN apt-get install -y wget flex libnuma-dev hwloc curl cmake \ diff --git a/docker/Dockerfile.nogil b/docker/Dockerfile.nogil new file mode 100644 index 0000000000..8f65dceb20 --- /dev/null +++ b/docker/Dockerfile.nogil @@ -0,0 +1,58 @@ +############################################################## +# Builds a base image with free-threaded Python 3.13 +############################################################## + +ARG FROM_IMAGE=ubuntu:22.04 + +FROM $FROM_IMAGE AS builder + +ENV DEBIAN_FRONTEND=noninteractive + +# Add deb-src URI sources for Python build dependence discovery +RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main" >> /etc/apt/sources.list && \ + apt-get update + +# Install required build dependencies for Python +RUN apt-get build-dep -y python3 + +# Install dependencies for all optional modules +# See https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies +RUN apt-get install -y \ + git build-essential gdb lcov pkg-config \ + libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ + libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ + lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev libzstd-dev + + +# Clone CPython repository at the 3.13 branch +RUN git clone --depth 1 --branch 3.13 https://github.com/python/cpython.git /tmp/cpython + + +# Configure, build, and install Python 3.13 with the GIL disabled +WORKDIR /tmp/cpython +RUN ./configure \ + --prefix=/opt/python3 \ + --disable-gil \ + --enable-optimizations \ + --enable-multilib \ + --enable-shared \ + LDFLAGS="-Wl,-rpath /opt/python3/lib" +RUN make -j$(nproc) +RUN make install + + +# Reset the working directory and clean up +WORKDIR / +RUN rm -rf /tmp/cpython + +# Set the PATH to include custom Python build +ENV PATH="/opt/python3/bin:${PATH}" + + +# Install some Python runtime dependencies +RUN apt-get install -y \ + libnuma-dev && \ + rm -rf /var/lib/apt/lists/* + +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip cache purge diff --git a/docker/Dockerfile.nvidia b/docker/Dockerfile.nvidia index 734a1fbeda..cfca493df6 100644 --- a/docker/Dockerfile.nvidia +++ b/docker/Dockerfile.nvidia @@ -7,7 +7,8 @@ ARG arch="nvc" ######################################################################## # Build base image with apt setup and common env ######################################################################## -FROM ubuntu:22.04 AS sdk-base +ARG FROM_IMAGE=ubuntu:22.04 +FROM $FROM_IMAGE AS sdk-base SHELL ["/bin/bash", "-c"] @@ -16,7 +17,12 @@ ENV DEBIAN_FRONTEND noninteractive # Install python RUN apt-get update && \ apt-get install -y -q gpg apt-utils curl wget libnuma-dev cmake git \ - dh-autoreconf python3-venv python3-dev python3-pip + dh-autoreconf && \ + if [ ! -d "/opt/python3" ]; then \ + apt-get install -y -q python3-venv python3-dev python3-pip; \ + else \ + echo "Using free-threaded Python build"; \ + fi; # nodesource: nvdashboard requires nodejs>=10 RUN curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | gpg --yes --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg @@ -97,8 +103,8 @@ RUN echo "$HPCSDK_HOME/cuda/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ echo "$HPCSDK_HOME/compilers/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ echo "$HPCSDK_HOME/comm_libs/mpi/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ echo "$HPCSDK_CUPTI/lib64" >> /etc/ld.so.conf.d/nvidia.conf && \ - echo "$HPCSDK_HOME/math_libs/lib64" >> /etc/ld.so.conf.d/nvidia.conf - + echo "$HPCSDK_HOME/math_libs/lib64" >> /etc/ld.so.conf.d/nvidia.conf + # Compiler, CUDA, and Library paths # CUDA_HOME has been deprecated but keep for now because of other dependencies (@mloubout). ENV CUDA_HOME $HPCSDK_HOME/cuda From 7df3a4ff6ce997033de0402aacab0459d601fcd0 Mon Sep 17 00:00:00 2001 From: enwask Date: Wed, 23 Jul 2025 18:06:53 +0100 Subject: [PATCH 2/5] ci: Build free-threaded base images --- .github/workflows/docker-bases.yml | 138 ++++++++++++++++++++++++----- docker/Dockerfile.amd | 3 +- docker/Dockerfile.cpu | 6 +- docker/Dockerfile.intel | 4 +- docker/Dockerfile.nogil | 4 +- docker/Dockerfile.nvidia | 4 +- 6 files changed, 128 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docker-bases.yml b/.github/workflows/docker-bases.yml index 28c24a1813..016f78a464 100644 --- a/.github/workflows/docker-bases.yml +++ b/.github/workflows/docker-bases.yml @@ -11,20 +11,24 @@ on: - "/docker/Dockerfile.cpu" - "/docker/Dockerfile.amd" - "/docker/Dockerfile.intel" + - "/docker/Dockerfile.nogil" workflow_dispatch: inputs: + nogil: + type: boolean + default: true cpu: type: boolean - default: false + default: true nvidia: type: boolean - default: false + default: true amd: type: boolean - default: false + default: true intel: type: boolean - default: false + default: true tags: description: "Build compiler bases" @@ -33,6 +37,43 @@ on: - cron: "0 0 1 * *" jobs: + ####################################################### + ########### Free-threaded Python meta-base ############ + ####################################################### + deploy-nogil-base: + name: "python-nogil-base" + runs-on: ubuntu-latest + if: inputs.nogil + env: + DOCKER_BUILDKIT: "1" + + steps: + - name: Checkout devito + uses: actions/checkout@v5 + + - name: Check event name + run: echo ${{ github.event_name }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build free-threaded Python base + uses: docker/build-push-action@v6 + with: + context: . + file: "./docker/Dockerfile.nogil" + push: true + tags: "devitocodes/bases:python-nogil" + ####################################################### ############## Basic gcc CPU ########################## ####################################################### @@ -46,10 +87,18 @@ jobs: strategy: matrix: gcc: ["", "14"] + disable-gil: [false, true] + include: + - disable-gil: false + build-args: "" + suffix: "" + - disable-gil: true + build-args: "base=devitocodes/bases:python-nogil" + suffix: "-nogil" steps: - name: Checkout devito - uses: actions/checkout@v5 + uses: actions/checkout@v4 - name: Check event name run: echo ${{ github.event_name }} @@ -72,8 +121,10 @@ jobs: context: . file: "./docker/Dockerfile.cpu" push: true - build-args: "gcc=${{ matrix.gcc }}" - tags: "devitocodes/bases:cpu-gcc${{ matrix.gcc }}" + build-args: | + gcc=${{ matrix.gcc }} + ${{ matrix.build-args }} + tags: "devitocodes/bases:cpu-gcc${{ matrix.gcc }}${{ matrix.suffix }}" ####################################################### ############## Intel OneApi CPU ####################### @@ -85,6 +136,16 @@ jobs: env: DOCKER_BUILDKIT: "1" + strategy: + matrix: + include: + - disable-gil: false + build-args: "" + suffix: "" + - disable-gil: true + build-args: "base=devitocodes/bases:python-nogil" + suffix: "-nogil" + steps: - name: Checkout devito uses: actions/checkout@v5 @@ -103,6 +164,7 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: ICX image uses: docker/build-push-action@v6 with: @@ -110,8 +172,10 @@ jobs: file: "./docker/Dockerfile.intel" push: true target: "icx" - build-args: "arch=icx" - tags: "devitocodes/bases:cpu-icx" + build-args: | + arch=icx + ${{ matrix.build-args }} + tags: "devitocodes/bases:cpu-icx${{ matrix.suffix }}" - name: SYCL CPU image uses: docker/build-push-action@v6 @@ -120,8 +184,10 @@ jobs: file: "./docker/Dockerfile.intel" push: true target: "cpu-sycl" - build-args: "arch=cpu-sycl" - tags: "devitocodes/bases:cpu-sycl" + build-args: | + arch=cpu-sycl + ${{ matrix.build-args }} + tags: "devitocodes/bases:cpu-sycl${{ matrix.suffix }}" - name: SYCL GPU image uses: docker/build-push-action@v6 @@ -130,8 +196,10 @@ jobs: file: "./docker/Dockerfile.intel" push: true target: "gpu-sycl" - build-args: "arch=gpu-sycl" - tags: "devitocodes/bases:gpu-sycl" + build-args: | + arch=gpu-sycl + ${{ matrix.build-args }} + tags: "devitocodes/bases:gpu-sycl${{ matrix.suffix }}" ####################################################### ################### Nvidia nvhpc ###################### @@ -143,6 +211,16 @@ jobs: env: DOCKER_BUILDKIT: "1" + strategy: + matrix: + include: + - disable-gil: false + build-args: "" + suffix: "" + - disable-gil: true + build-args: "base=devitocodes/bases:python-nogil" + suffix: "-nogil" + steps: - name: Checkout devito uses: actions/checkout@v5 @@ -169,10 +247,12 @@ jobs: file: "./docker/Dockerfile.nvidia" push: true target: "nvc" - build-args: "arch=nvc" + build-args: | + arch=nvc + ${{ matrix.build-args }} # Label (not tag) with runner name for traceability without changing image tags labels: builder-runner=${{ runner.name }} - tags: "devitocodes/bases:nvidia-nvc" + tags: "devitocodes/bases:nvidia-nvc${{ matrix.suffix }}" - name: NVCC image uses: docker/build-push-action@v6 @@ -181,9 +261,11 @@ jobs: file: "./docker/Dockerfile.nvidia" push: true target: "nvcc" - build-args: "arch=nvcc" + build-args: | + arch=nvcc + ${{ matrix.build-args }} labels: builder-runner=${{ runner.name }} - tags: "devitocodes/bases:nvidia-nvcc" + tags: "devitocodes/bases:nvidia-nvcc${{ matrix.suffix }}" - name: NVC host image uses: docker/build-push-action@v6 @@ -192,9 +274,11 @@ jobs: file: "./docker/Dockerfile.nvidia" push: true target: "nvc-host" - build-args: "arch=nvc-host" + build-args: | + arch=nvc-host + ${{ matrix.build-args }} labels: builder-runner=${{ runner.name }} - tags: "devitocodes/bases:cpu-nvc" + tags: "devitocodes/bases:cpu-nvc${{ matrix.suffix }}" ####################################################### ##################### AMD ############################# @@ -206,6 +290,16 @@ jobs: env: DOCKER_BUILDKIT: "1" + strategy: + matrix: + include: + - disable-gil: false + build-args: "" + suffix: "" + - disable-gil: true + build-args: "base=devitocodes/bases:python-nogil" + suffix: "-nogil" + steps: - name: Checkout devito uses: actions/checkout@v5 @@ -236,7 +330,8 @@ jobs: ROCM_VERSION=5.5.1 UCX_BRANCH=v1.13.1 OMPI_BRANCH=v4.1.4 - tags: devitocodes/bases:amd + ${{ matrix.build-args }} + tags: devitocodes/bases:amd${{ matrix.suffix }} - name: AMD HIP image uses: docker/build-push-action@v6 @@ -247,4 +342,5 @@ jobs: target: "hip" build-args: | ROCM_VERSION=6.3.4 - tags: devitocodes/bases:amd-hip + ${{ matrix.build-args }} + tags: devitocodes/bases:amd-hip${{ matrix.suffix }} diff --git a/docker/Dockerfile.amd b/docker/Dockerfile.amd index da4bc3184e..1dfac957ac 100644 --- a/docker/Dockerfile.amd +++ b/docker/Dockerfile.amd @@ -4,8 +4,9 @@ ############################################################## ARG ROCM_VERSION=6.3.2 -ARG FROM_IMAGE=ubuntu:22.04 +ARG base=ubuntu:22.04 +# Base may be specified with the nogil base to provide a Python build FROM $base AS ubuntu-base FROM rocm/dev-ubuntu-22.04:${ROCM_VERSION}-complete AS sdk-base diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index 7c3d490b07..72d084debd 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -5,10 +5,10 @@ ############################################################## # Base image is either ubuntu or the nogil base -ARG FROM_IMAGE=ubuntu:22.04 -ARG gcc="" +ARG base=ubuntu:22.04 -FROM $FROM_IMAGE AS base +FROM $base AS base +ARG gcc="" ENV DEBIAN_FRONTEND=noninteractive diff --git a/docker/Dockerfile.intel b/docker/Dockerfile.intel index 8b80ed102b..a60ea948d9 100644 --- a/docker/Dockerfile.intel +++ b/docker/Dockerfile.intel @@ -4,8 +4,8 @@ ############################################################## # Base image -ARG FROM_IMAGE=ubuntu:22.04 -FROM $FROM_IMAGE as base +ARG base=ubuntu:22.04 +FROM $base as base ENV DEBIAN_FRONTEND noninteractive diff --git a/docker/Dockerfile.nogil b/docker/Dockerfile.nogil index 8f65dceb20..efff815f59 100644 --- a/docker/Dockerfile.nogil +++ b/docker/Dockerfile.nogil @@ -2,9 +2,9 @@ # Builds a base image with free-threaded Python 3.13 ############################################################## -ARG FROM_IMAGE=ubuntu:22.04 +ARG base=ubuntu:22.04 -FROM $FROM_IMAGE AS builder +FROM $base AS builder ENV DEBIAN_FRONTEND=noninteractive diff --git a/docker/Dockerfile.nvidia b/docker/Dockerfile.nvidia index cfca493df6..0cd9f870e1 100644 --- a/docker/Dockerfile.nvidia +++ b/docker/Dockerfile.nvidia @@ -7,8 +7,8 @@ ARG arch="nvc" ######################################################################## # Build base image with apt setup and common env ######################################################################## -ARG FROM_IMAGE=ubuntu:22.04 -FROM $FROM_IMAGE AS sdk-base +ARG base=ubuntu:22.04 +FROM $base AS sdk-base SHELL ["/bin/bash", "-c"] From 9e99c8414970633b30d3ca528c0f395d0163a75b Mon Sep 17 00:00:00 2001 From: enwask Date: Wed, 23 Jul 2025 18:25:08 +0100 Subject: [PATCH 3/5] ci: Build free-threaded Docker images --- .github/workflows/docker-devito.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/docker-devito.yml b/.github/workflows/docker-devito.yml index a70bc6d6da..e49e30f4b0 100644 --- a/.github/workflows/docker-devito.yml +++ b/.github/workflows/docker-devito.yml @@ -27,6 +27,12 @@ jobs: test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py' runner: ["self-hosted", "nvidiagpu"] + - base: 'bases:nvidia-nvc-nogil' + tag: 'nvidia-nvc-nogil' + flag: '--init --gpus all' + test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py' + runner: ["self-hosted", "nvidiagpu"] + # Runtime gpu flags from https://hub.docker.com/r/rocm/tensorflow/ - base: 'bases:amd' tag: 'amd' @@ -34,18 +40,36 @@ jobs: test: 'tests/test_gpu_openmp.py' runner: ["self-hosted", "amdgpu"] + - base: 'bases:amd-nogil' + tag: 'amd-nogil' + flag: '--init --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined' + test: 'tests/test_gpu_openmp.py' + runner: ["self-hosted", "amdgpu"] + - base: 'bases:cpu-gcc' tag: "gcc" flag: '--init -t' test: 'tests/test_operator.py' runner: ubuntu-latest + - base: 'bases:cpu-gcc-nogil' + tag: "gcc-nogil" + flag: '--init -t' + test: 'tests/test_operator.py' + runner: ubuntu-latest + - base: 'bases:cpu-icx' tag: "icx" flag: '--init -t' test: 'tests/test_operator.py' runner: ubuntu-latest + - base: 'bases:cpu-icx-nogil' + tag: "icx-nogil" + flag: '--init -t' + test: 'tests/test_operator.py' + runner: ubuntu-latest + steps: - name: Checkout devito uses: actions/checkout@v5 From 6be68370b3f476243929d5c9cb75129e20ba0e89 Mon Sep 17 00:00:00 2001 From: enwask Date: Fri, 25 Jul 2025 14:56:41 +0100 Subject: [PATCH 4/5] ci: Add basic nogil operator tests --- .github/workflows/pytest-core-nompi.yml | 32 ++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest-core-nompi.yml b/.github/workflows/pytest-core-nompi.yml index 5453cb67ae..3f8c4cf1d5 100644 --- a/.github/workflows/pytest-core-nompi.yml +++ b/.github/workflows/pytest-core-nompi.yml @@ -16,7 +16,7 @@ on: jobs: pytest: - name: ${{ matrix.name }}-${{ matrix.set }} + name: ${{ matrix.name }}-${{ matrix.suffix || matrix.set }} runs-on: "${{ matrix.os }}" env: @@ -39,6 +39,7 @@ jobs: pytest-osx-py312-clang-omp, pytest-docker-py310-gcc-omp, pytest-docker-py310-icx-omp, + pytest-docker-py313-gcc-nogil, pytest-ubuntu-py313-gcc14-omp ] set: [base, adjoint] @@ -49,6 +50,7 @@ jobs: arch: "gcc-11" language: "CXX" sympy: "1.14" + test-path: 'tests/' - name: pytest-ubuntu-py312-gcc12-cxxomp python-version: '3.12' @@ -56,6 +58,7 @@ jobs: arch: "gcc-12" language: "CXXopenmp" sympy: "1.13" + test-path: 'tests/' - name: pytest-ubuntu-py310-gcc14-omp python-version: '3.10' @@ -63,6 +66,7 @@ jobs: arch: "gcc-14" language: "openmp" sympy: "1.12" + test-path: 'tests/' - name: pytest-ubuntu-py311-gcc10-noomp python-version: '3.11' @@ -70,6 +74,7 @@ jobs: arch: "gcc-10" language: "C" sympy: "1.14" + test-path: 'tests/' - name: pytest-ubuntu-py312-gcc13-omp python-version: '3.12' @@ -77,6 +82,7 @@ jobs: arch: "gcc-13" language: "openmp" sympy: "1.13" + test-path: 'tests/' - name: pytest-ubuntu-py310-gcc9-omp python-version: '3.10' @@ -84,6 +90,7 @@ jobs: arch: "custom" language: "openmp" sympy: "1.12" + test-path: 'tests/' - name: pytest-osx-py312-clang-omp python-version: '3.12' @@ -91,20 +98,35 @@ jobs: arch: "clang" language: "openmp" sympy: "1.12" + test-path: 'tests/' - name: pytest-docker-py310-gcc-omp python-version: '3.10' os: ubuntu-latest + base-image: "cpu-gcc" arch: "gcc" language: "openmp" sympy: "1.13" + test-path: 'tests/' - name: pytest-docker-py310-icx-omp python-version: '3.10' os: ubuntu-latest + base-image: "cpu-icx" arch: "icx" language: "openmp" sympy: "1.13" + test-path: 'tests/' + + - name: pytest-docker-py313-gcc-nogil + python-version: '3.13' + os: ubuntu-latest + base-image: "cpu-gcc-nogil" + arch: "gcc" + language: "C" + sympy: "1.14" + test-path: 'tests/test_operator.py' + suffix: 'operator' - name: pytest-ubuntu-py313-gcc14-omp python-version: '3.13' @@ -112,6 +134,7 @@ jobs: arch: "gcc-14" language: "openmp" sympy: "1.14" + test-path: 'tests/' - set: base test-set: 'not adjoint' @@ -123,6 +146,9 @@ jobs: - name: pytest-osx-py312-clang-omp set: adjoint + - name: pytest-docker-py313-gcc-nogil + set: adjoint + steps: - name: Checkout devito uses: actions/checkout@v5 @@ -137,7 +163,7 @@ jobs: - name: Build docker image if: contains(matrix.name, 'docker') run: | - docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=devitocodes/bases:cpu-${{ matrix.arch }} + docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=devitocodes/bases:${{ matrix.base-image }} - name: Set run prefix run: | @@ -195,7 +221,7 @@ jobs: - name: Test with pytest run: | - ${{ env.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml tests/ + ${{ env.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml "${{ matrix.test-path }}" - name: Upload coverage to Codecov if: "!contains(matrix.name, 'docker')" From 3054e73357aad796931598eefcaf46f7708b4a5e Mon Sep 17 00:00:00 2001 From: enwask Date: Wed, 13 Aug 2025 12:43:36 -0500 Subject: [PATCH 5/5] deps: Drop cupy dependence --- requirements-nvidia.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements-nvidia.txt b/requirements-nvidia.txt index 44f74ff3ab..2d13982b34 100644 --- a/requirements-nvidia.txt +++ b/requirements-nvidia.txt @@ -1,4 +1,3 @@ -cupy-cuda12x<13.5.2 dask-cuda<25.8.1 jupyterlab>=3,<4.4.2 jupyterlab-nvdashboard<0.13.1