Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

ENH: add suppport for Kokkos::complex Views #286

ENH: add suppport for Kokkos::complex Views

ENH: add suppport for Kokkos::complex Views #286

Workflow file for this run

name: linux-ci
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
BUILD_TYPE: Release
jobs:
cmake-build:
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13]
kokkos-branch: ['release-candidate-4.7.01']
os: [ubuntu-latest, ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update container
run:
sudo apt-get update &&
sudo apt-get install -y build-essential gcc g++ ninja-build &&
python -m pip install --upgrade pip &&
python -m pip install 'cmake==3.22.0'
- name: Install Kokkos
run:
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source &&
cmake -B /tmp/kokkos-build
-DKokkos_ENABLE_SERIAL=ON
-DKokkos_ENABLE_OPENMP=OFF
-DBUILD_SHARED_LIBS=ON
/tmp/kokkos-source &&
cmake --build /tmp/kokkos-build --target all --parallel 2 &&
sudo cmake --build /tmp/kokkos-build --target install --parallel 2
- name: Configure CMake
run:
python -m pip install -r requirements.txt &&
python -m pip install pytest &&
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DENABLE_LAYOUTS=OFF
-DENABLE_MEMORY_TRAITS=OFF
-DENABLE_EXAMPLES=ON
-DENABLE_WERROR=ON
-DENABLE_PRECOMPILED_HEADERS=ON
-DPython3_EXECUTABLE=$(which python)
- name: Build
run:
cmake --build ${{github.workspace}}/build --target all --parallel 2 &&
sudo cmake --build ${{github.workspace}}/build --target install --parallel 2
- name: Import Test
working-directory: ${{github.workspace}}/build
run:
mkdir -p scratch &&
cd scratch &&
export PYTHONPATH=/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH} &&
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)"
- name: Test
working-directory: ${{github.workspace}}/build
run:
export PYTHONPATH=${PWD}:/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH} &&
ls &&
pytest . --ignore=_deps/ &&
python ./ex-numpy.py
python-build:
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13]
kokkos-branch: ['release-candidate-4.7.01']
os: [ubuntu-latest, ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update container
run:
sudo apt-get update &&
sudo apt-get install -y build-essential gcc g++ ninja-build &&
python -m pip install --upgrade pip &&
python -m pip install 'cmake==3.22.0'
- name: Install Kokkos
run:
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source &&
cmake -B /tmp/kokkos-build -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DCMAKE_CXX_STANDARD=17 -DBUILD_SHARED_LIBS=ON /tmp/kokkos-source &&
cmake --build /tmp/kokkos-build --target all --parallel 2 &&
sudo cmake --build /tmp/kokkos-build --target install --parallel 2
- name: Build
run:
python -m pip install -r requirements.txt &&
python -m pip install pytest &&
python setup.py install --enable-layouts --enable-view-ranks=4 --disable-memory-traits --enable-werror -- -DENABLE_EXAMPLES=ON -- -j1
- name: Import Test
run:
mkdir -p scratch &&
cd scratch &&
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)" &&
python -m kokkos.test
- name: Test
working-directory: ${{github.workspace}}/_skbuild
run:
cd ./*/cmake-build &&
ls &&
pytest . --ignore=_deps/ &&
python ./ex-numpy.py
pip-build:
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13]
kokkos-branch: ['release-candidate-4.7.01']
os: [ubuntu-latest, ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update container
run:
sudo apt-get update &&
sudo apt-get install -y build-essential gcc g++ ninja-build &&
python -m pip install --upgrade pip &&
python -m pip install 'cmake==3.22.0'
- name: Install Kokkos
run:
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source &&
cmake -B /tmp/kokkos-build
-DKokkos_ENABLE_SERIAL=ON
-DKokkos_ENABLE_THREADS=ON
-DCMAKE_CXX_STANDARD=20
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
/tmp/kokkos-source &&
cmake --build /tmp/kokkos-build --target all --parallel 2 &&
sudo cmake --build /tmp/kokkos-build --target install --parallel 2
- name: Build
run:
python -m pip install -r requirements.txt &&
python -m pip install pytest &&
CMAKE_BUILD_PARALLEL_LEVEL=2 PYKOKKOS_BASE_SETUP_ARGS="-DENABLE_WERROR=ON -DENABLE_MEMORY_TRAITS=ON -DENABLE_LAYOUTS=ON -DENABLE_VIEW_RANKS=2 -DCMAKE_CXX_STANDARD=17 -DKokkos_ENABLE_THREADS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF"
python -m pip install -v --user --no-deps .
- name: Import Test
run:
mkdir -p scratch &&
cd scratch &&
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)"
- name: Test
working-directory: ${{github.workspace}}/scratch
run:
python -m kokkos.test
subproject:
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13]
os: [ubuntu-latest, ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
path: ${{github.workspace}}/pykokkos-base
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update container
run:
sudo apt-get update &&
sudo apt-get install -y build-essential gcc g++ ninja-build &&
python -m pip install --upgrade pip &&
python -m pip install 'cmake==3.22.0'
- name: Generate CMakeLists.txt
run: |
echo -e "cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR)\nproject(pykokkos-base-as-subproject LANGUAGES CXX)\nadd_subdirectory(pykokkos-base)" > ${{github.workspace}}/CMakeLists.txt
cat ${{github.workspace}}/CMakeLists.txt
- name: Configure CMake
run:
python -m pip install -r ${{github.workspace}}/pykokkos-base/requirements.txt &&
python -m pip install pytest &&
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DENABLE_LAYOUTS=OFF
-DENABLE_MEMORY_TRAITS=OFF
-DENABLE_VIEW_RANKS=1
-DENABLE_EXAMPLES=ON
-DENABLE_WERROR=ON
-DENABLE_SERIAL=ON
-DENABLE_OPENMP=ON
-DBUILD_SHARED_LIBS=ON
-DPYTHON_EXECUTABLE=$(which python)
-DPython3_EXECUTABLE=$(which python)
${{github.workspace}}
- name: Build
run:
cmake --build ${{github.workspace}}/build --target all --parallel 2 &&
sudo cmake --build ${{github.workspace}}/build --target install --parallel 2
- name: Setup PYTHONPATH
run:
echo "PYTHONPATH=/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH}" >> $GITHUB_ENV
- name: Import Test
run:
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)"
- name: Test
run:
python -m kokkos.test