From a6ab48482263586809982a279cf4b22cf27088eb Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 11:49:50 -0600 Subject: [PATCH 01/22] ENH: set PyBind11 version to 3.0 --- external/pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/pybind11 b/external/pybind11 index aa304c9..f5fbe86 160000 --- a/external/pybind11 +++ b/external/pybind11 @@ -1 +1 @@ -Subproject commit aa304c9c7d725ffb9d10af08a3b34cb372307020 +Subproject commit f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8 From 27a7b7020cb81536e65d9e790c6c13b30be08c2e Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Thu, 9 Oct 2025 12:17:39 -0600 Subject: [PATCH 02/22] Update Python versions in CI workflow Supported python versions as per (https://devguide.python.org/versions/)[https://devguide.python.org/versions/] --- .github/workflows/linux-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index b4e3468..5061d7a 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 'pypy-3.6', 'pypy-3.7'] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] kokkos-branch: ['master', 'develop'] steps: From d6b2895827902ab5479bc53f7266cd3b526e9e88 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Thu, 9 Oct 2025 12:18:22 -0600 Subject: [PATCH 03/22] Update Python versions in CI workflow Supported python versions as per (https://devguide.python.org/versions/)[https://devguide.python.org/versions/] --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2dbc437..0e25002 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.9, 3.10, 3.11, 3.12, 3.12] steps: - uses: actions/checkout@v2 From 814403ee12accb0f75acdaf96cac38558acb2eca Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Thu, 9 Oct 2025 12:25:46 -0600 Subject: [PATCH 04/22] Remove formatting job from python-package.yml Remove formatting job for python 3.8 --- .github/workflows/python-package.yml | 41 ---------------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0e25002..598f766 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,44 +33,3 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # flake8 options are defined in setup.cfg flake8 . --count --statistics - - formatting: - runs-on: ubuntu-18.04 - strategy: - matrix: - python-version: [3.8] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - DISTRIB_CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F '=' '{print $NF}') - sudo apt-get update - sudo apt-get install -y software-properties-common wget curl - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-8 main" | sudo tee -a /etc/apt/sources.list.d/llvm-toolchain.list - echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-8 main" | sudo tee -a /etc/apt/sources.list.d/llvm-toolchain.list - sudo apt-get update - sudo apt-get install -y clang-format-8 - - name: black format - run: | - black --diff --check . - - name: clang-format - run: | - set +e - FILES=$(find include src examples -type f | egrep '\.hpp$|\.cpp$|\.cpp\.in$') - FORMAT_OUT=$(clang-format-8 -output-replacements-xml ${FILES}) - RET=$(echo ${FORMAT_OUT} | grep -c ' Date: Thu, 9 Oct 2025 12:26:59 -0600 Subject: [PATCH 05/22] Update Python versions in CI workflow --- .github/workflows/linux-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 5061d7a..a99dd0f 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 'pypy-3.6', 'pypy-3.7'] + python-version: [3.9, 3.10, 3.11, 3.12, 3.12] kokkos-branch: ['master'] steps: @@ -144,7 +144,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: [3.9, 3.10, 3.11, 3.12, 3.12] kokkos-branch: ['develop'] steps: @@ -197,7 +197,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9] + python-version: [3.9, 3.10, 3.11, 3.12, 3.12] steps: - uses: actions/checkout@v3 From daecc645ec7360358cfe0497cc0949e0d82ed8cd Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 12:29:46 -0600 Subject: [PATCH 06/22] Switch Kokkos to 4.7.01 --- external/kokkos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/kokkos b/external/kokkos index 15dc143..b601b82 160000 --- a/external/kokkos +++ b/external/kokkos @@ -1 +1 @@ -Subproject commit 15dc143e5f39949eece972a798e175c4b463d4b8 +Subproject commit b601b82d0f4b4491aeafb7b19cde557e92aa761d From 67ccef8328a2038e56658d347c5a7fafbd85f80a Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 13:22:25 -0600 Subject: [PATCH 07/22] Add back in formating with correct python versions --- .github/workflows/python-package.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 598f766..47655c2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,3 +33,44 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # flake8 options are defined in setup.cfg flake8 . --count --statistics + +formatting: + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [3.9, 3.10, 3.11, 3.12] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + DISTRIB_CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F '=' '{print $NF}') + sudo apt-get update + sudo apt-get install -y software-properties-common wget curl + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + echo "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-8 main" | sudo tee -a /etc/apt/sources.list.d/llvm-toolchain.list + echo "deb-src http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-8 main" | sudo tee -a /etc/apt/sources.list.d/llvm-toolchain.list + sudo apt-get update + sudo apt-get install -y clang-format-8 + - name: black format + run: | + black --diff --check . + - name: clang-format + run: | + set +e + FILES=$(find include src examples -type f | egrep '\.hpp$|\.cpp$|\.cpp\.in$') + FORMAT_OUT=$(clang-format-8 -output-replacements-xml ${FILES}) + RET=$(echo ${FORMAT_OUT} | grep -c ' Date: Thu, 9 Oct 2025 13:27:27 -0600 Subject: [PATCH 08/22] Remove stale if branches --- .github/workflows/linux-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index a99dd0f..80ec36b 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -33,7 +33,6 @@ jobs: python -m pip install 'cmake==3.18.4' - name: Install Kokkos - if: ${{ matrix.python-version != 'pypy-3.6' && matrix.python-version != 'pypy-3.7' }} run: git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && cmake -B /tmp/kokkos-build @@ -101,7 +100,6 @@ jobs: python -m pip install 'cmake==3.18.4' - name: Install Kokkos - if: ${{ matrix.python-version != '3.8' && matrix.python-version != '3.9' }} run: git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && cmake -B /tmp/kokkos-build @@ -163,7 +161,6 @@ jobs: python -m pip install 'cmake==3.20.2' - name: Install Kokkos - if: ${{ matrix.python-version != '3.7' }} run: git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && cmake -B /tmp/kokkos-build From 611e70ef543fdfd89c5c64112f67a2166bd15d01 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Thu, 9 Oct 2025 13:57:31 -0600 Subject: [PATCH 09/22] Update .github/workflows/python-package.yml Co-authored-by: JBludau <104908666+JBludau@users.noreply.github.com> --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 47655c2..1799c2a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,7 +34,7 @@ jobs: # flake8 options are defined in setup.cfg flake8 . --count --statistics -formatting: + formatting: runs-on: ubuntu-18.04 strategy: matrix: From 38ebe04948e5c69c8dfb243aca70b0194b952c45 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Thu, 9 Oct 2025 13:57:44 -0600 Subject: [PATCH 10/22] Update .github/workflows/python-package.yml Co-authored-by: JBludau <104908666+JBludau@users.noreply.github.com> --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1799c2a..fcbb3c0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -35,7 +35,7 @@ jobs: flake8 . --count --statistics formatting: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: matrix: python-version: [3.9, 3.10, 3.11, 3.12] From f13a5dc8604bc72c73902d4f29aff22b82a79901 Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 14:03:13 -0600 Subject: [PATCH 11/22] Test python 3.9-3.13, change cmake to 3.31.9 --- .github/workflows/linux-ci.yml | 14 +++++++------- .github/workflows/python-package.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 80ec36b..0bd7361 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -30,7 +30,7 @@ jobs: 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.18.4' + python -m pip install 'cmake==3.31.9' - name: Install Kokkos run: @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.12] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] kokkos-branch: ['master'] steps: @@ -97,7 +97,7 @@ jobs: 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.18.4' + python -m pip install 'cmake==3.31.9' - name: Install Kokkos run: @@ -142,7 +142,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.12] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] kokkos-branch: ['develop'] steps: @@ -158,7 +158,7 @@ jobs: 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.20.2' + python -m pip install 'cmake==3.31.9' - name: Install Kokkos run: @@ -194,7 +194,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.12] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v3 @@ -212,7 +212,7 @@ jobs: 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.18.4' + python -m pip install 'cmake==3.31.9' - name: Generate Hierarchy run: | diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fcbb3c0..d923dd9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.12] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12] + python-version: [3.9, 3.10, 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v2 From ada444696f9a93b27d2ff44c7744e21a75dc05c3 Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 14:04:27 -0600 Subject: [PATCH 12/22] Only use python 3.13 for formatting --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d923dd9..237be58 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.13] steps: - uses: actions/checkout@v2 From 92b54f5d344997a926df3245e00a8be127cfc18e Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 14:18:45 -0600 Subject: [PATCH 13/22] Wrap "3.10" in quotes to avoid yaml parsing bug See https://github.com/actions/runner/issues/1989 --- .github/workflows/linux-ci.yml | 8 ++++---- .github/workflows/python-package.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 0bd7361..06f2456 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13] kokkos-branch: ['master', 'develop'] steps: @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13] kokkos-branch: ['master'] steps: @@ -142,7 +142,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13] kokkos-branch: ['develop'] steps: @@ -194,7 +194,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 237be58..1c2f222 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12, 3.13] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v2 From 175932e1fee63b302856045f8979e40f9f142455 Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Thu, 9 Oct 2025 15:37:06 -0600 Subject: [PATCH 14/22] Change cmake version to 3.31.6 --- .github/workflows/linux-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 06f2456..9409727 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -30,7 +30,7 @@ jobs: 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.31.9' + python -m pip install 'cmake==3.31.6' - name: Install Kokkos run: @@ -97,7 +97,7 @@ jobs: 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.31.9' + python -m pip install 'cmake==3.31.6' - name: Install Kokkos run: @@ -158,7 +158,7 @@ jobs: 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.31.9' + python -m pip install 'cmake==3.31.6' - name: Install Kokkos run: @@ -212,7 +212,7 @@ jobs: 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.31.9' + python -m pip install 'cmake==3.31.6' - name: Generate Hierarchy run: | From 03282f79b44c6fb92a6171d281e33f16925e73cf Mon Sep 17 00:00:00 2001 From: Jakob Bludau Date: Fri, 10 Oct 2025 11:19:12 -0400 Subject: [PATCH 15/22] use c++20 --- .github/workflows/linux-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 9409727..db7784e 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -105,7 +105,6 @@ jobs: 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 && @@ -166,7 +165,6 @@ jobs: cmake -B /tmp/kokkos-build -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_THREADS=ON - -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON /tmp/kokkos-source && cmake --build /tmp/kokkos-build --target all --parallel 2 && @@ -176,7 +174,7 @@ jobs: run: python -m pip install -r requirements.txt && python -m pip install pytest && - 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" + PYKOKKOS_BASE_SETUP_ARGS="-DENABLE_WERROR=ON -DENABLE_MEMORY_TRAITS=ON -DENABLE_LAYOUTS=ON -DENABLE_VIEW_RANKS=2 -DKokkos_ENABLE_THREADS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF" python -m pip install -v --user --no-deps -e . - name: Import Test From 1d06d35a68c7341c72795d8d0959561bca6a821c Mon Sep 17 00:00:00 2001 From: Jakob Bludau Date: Fri, 10 Oct 2025 11:48:57 -0400 Subject: [PATCH 16/22] pool.init is deprecated --- include/pools.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/pools.hpp b/include/pools.hpp index 3c2240f..3e6edeb 100644 --- a/include/pools.hpp +++ b/include/pools.hpp @@ -65,11 +65,8 @@ void generate_pool(py::module &_mod, const std::string &_name, _pool.def(py::init([](uint64_t seed) { return new PoolT{seed}; })); - _pool.def( - "init", - [](PoolT &_p, uint64_t _seed, int _num_states) { - _p.init(_seed, _num_states); - }, - "Initialize the random pool"); + _pool.def(py::init([](uint64_t seed, uint64_t num_states) { + return new PoolT{seed, num_states}; + })); } } // namespace Common \ No newline at end of file From d86f6a1532973c3ffec52396a7594ebc624f2ab3 Mon Sep 17 00:00:00 2001 From: Jakob Bludau Date: Fri, 10 Oct 2025 11:49:19 -0400 Subject: [PATCH 17/22] add maybe unused to prevent compiler from complaining --- include/execution_spaces.hpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/execution_spaces.hpp b/include/execution_spaces.hpp index 669ed88..c921c01 100644 --- a/include/execution_spaces.hpp +++ b/include/execution_spaces.hpp @@ -53,19 +53,23 @@ namespace Common { template -void generate_execution_space_init(py::class_ &, +void generate_execution_space_init( + [[maybe_unused]] py::class_ &, enable_if_t = 0) {} template -void generate_execution_space_init(py::class_ &, +void generate_execution_space_init( + [[maybe_unused]] py::class_ &, enable_if_t = 0) {} template -void generate_execution_space_init(py::class_ &, +void generate_execution_space_init( + [[maybe_unused]] py::class_ &, enable_if_t = 0) {} template -void generate_execution_space_init(py::class_ &_space, +void generate_execution_space_init( + [[maybe_unused]] py::class_ &_space, enable_if_t = 0) { #if defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__) _space.def(py::init([](uint64_t stream_ptr, bool manage_stream) { @@ -76,7 +80,8 @@ void generate_execution_space_init(py::class_ &_space, } template -void generate_execution_space_init(py::class_ &_space, +void generate_execution_space_init( + [[maybe_unused]] py::class_ &_space, enable_if_t = 0) { #if defined(KOKKOS_ENABLE_HIP) && defined(__HIPCC__) _space.def(py::init([](uint64_t stream_ptr, bool manage_stream) { @@ -134,4 +139,5 @@ template void generate_execution_spaces(py::module &_mod, std::index_sequence) { FOLD_EXPRESSION(Space::generate_execution_space(_mod)); -} \ No newline at end of file +} +% \ No newline at end of file From a315416acff5128bd4718a394b10e19897262ace Mon Sep 17 00:00:00 2001 From: Gabriel Kenneth Kosmacher Date: Mon, 13 Oct 2025 09:04:18 -0600 Subject: [PATCH 18/22] Remove % character --- include/execution_spaces.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/execution_spaces.hpp b/include/execution_spaces.hpp index c921c01..a0ecba2 100644 --- a/include/execution_spaces.hpp +++ b/include/execution_spaces.hpp @@ -140,4 +140,4 @@ void generate_execution_spaces(py::module &_mod, std::index_sequence) { FOLD_EXPRESSION(Space::generate_execution_space(_mod)); } -% \ No newline at end of file + From 3a9b40b1bc39dd4143f534d94da633700bf4d989 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:39:51 -0600 Subject: [PATCH 19/22] Change cmake Kokkos_DIR -> Kokkos_ROOT To conform with [https://github.com/kokkos/kokkos/wiki/Compiling/0c704c9ce972cb9e12d3a1432c183d534b6f679f#using-kokkos-installed-package](https://github.com/kokkos/kokkos/wiki/Compiling/0c704c9ce972cb9e12d3a1432c183d534b6f679f#using-kokkos-installed-package) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80482b7..f3bef29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,10 +110,10 @@ EXECUTE_PROCESS( WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) # location where kokkos libraries are/will be installed -IF(ENABLE_INTERNAL_KOKKOS OR NOT Kokkos_DIR) +IF(ENABLE_INTERNAL_KOKKOS OR NOT Kokkos_ROOT) SET(_Kokkos_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -ELSEIF(Kokkos_DIR) - STRING(REGEX REPLACE "/cmake/.*" "" _Kokkos_LIBDIR "${Kokkos_DIR}") +ELSEIF(Kokkos_ROOT) + STRING(REGEX REPLACE "/cmake/.*" "" _Kokkos_LIBDIR "${Kokkos_ROOT}") ENDIF() # absolute path to libpykokkos install From e55aa64f3a1b7dce326b1492bbbf41019932e5d1 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:48:28 -0600 Subject: [PATCH 20/22] Kokkos_DIR -> Kokkos_ROOT --- cmake/Modules/KokkosPythonKokkos.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/KokkosPythonKokkos.cmake b/cmake/Modules/KokkosPythonKokkos.cmake index 3176498..dc535d6 100644 --- a/cmake/Modules/KokkosPythonKokkos.cmake +++ b/cmake/Modules/KokkosPythonKokkos.cmake @@ -44,8 +44,8 @@ IF(NOT _INTERNAL_KOKKOS AND NOT TARGET Kokkos::kokkoscore) FIND_FILE(Kokkos_InterOp_Header NO_DEFAULT_PATH NAMES Kokkos_InterOp.hpp KokkosExp_InterOp.hpp - PATHS ${Kokkos_INCLUDE_DIR} ${Kokkos_DIR} - HINTS ${Kokkos_INCLUDE_DIR} ${Kokkos_DIR} + PATHS ${Kokkos_INCLUDE_DIR} ${Kokkos_ROOT} + HINTS ${Kokkos_INCLUDE_DIR} ${Kokkos_ROOT} DOC "Path to Kokkos InterOp header" PATH_SUFFIXES include ../../../include) @@ -60,8 +60,8 @@ ELSEIF(TARGET Kokkos::kokkoscore) FIND_FILE(Kokkos_InterOp_Header NO_DEFAULT_PATH NAMES Kokkos_InterOp.hpp KokkosExp_InterOp.hpp - PATHS ${Kokkos_INCLUDE_DIR} ${Kokkos_DIR} - HINTS ${Kokkos_INCLUDE_DIR} ${Kokkos_DIR} + PATHS ${Kokkos_INCLUDE_DIR} ${Kokkos_ROOT} + HINTS ${Kokkos_INCLUDE_DIR} ${Kokkos_ROOT} DOC "Path to Kokkos InterOp header" PATH_SUFFIXES include ../../../include) From c1972ad58966d26ace3de2d4b5e7ab716341d817 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:54:16 -0600 Subject: [PATCH 21/22] Update README.md with external kokkos install instructions --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25ce953..92e342d 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,10 @@ of time required to compile the bindings. ### Kokkos Installation +If Kokkos is installed *externaly* to pykokkos-base, set the CMake option `ENABLE_INTERNAL_KOKKOS=OFF` +and set the environment variable `Kokkos_ROOT=/lib64/cmake/Kokkos`. If the `ENABLE_INTERNAL_KOKKOS` option is not specified the first time CMake is run, CMake will try to -find an existing Kokkos installation. If no existing installation is found, it will build and install +find an existing Kokkos installation. If an existing installation *is not* found, it will build and install Kokkos from a submodule. When Kokkos is added as a submodule, you can configure the submodule as you would normally configure Kokkos. However, due to some general awkwardness configuring cmake from `setup.py` (especially via `pip install`), CMake tries to "automatically" configure From 45836743ca72312bdd4f52bc734a2bf001e88fb6 Mon Sep 17 00:00:00 2001 From: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:20:31 -0600 Subject: [PATCH 22/22] Update setuptools requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0ca0fa7..8e6f104 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools < 60.0.0", + "setuptools < 80.0.0", "setuptools_scm >= 2.0.0", "wheel >= 0.29.0", "scikit-build >= 0.8.0",