diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 00000000..7f2b634f --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,39 @@ +name: Linux + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test_pykokkos: + strategy: + matrix: + platform: [ubuntu-latest, ubuntu-24.04-arm] + python-version: ["3.13"] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade numpy mypy==1.0.1 cmake pytest pybind11 scikit-build patchelf + - name: Install pykokkos-base + run: | + python install_base.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=1 + - name: Install pykokkos + run: | + python -m pip install . + - name: mypy check + run: | + mypy pykokkos + - name: import pykokkos + run: | + python -c "import pykokkos" diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml new file mode 100644 index 00000000..5de33557 --- /dev/null +++ b/.github/workflows/build_macos.yml @@ -0,0 +1,39 @@ +name: MacOS + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test_pykokkos: + strategy: + matrix: + platform: [macos-latest] + python-version: ["3.13"] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade numpy mypy==1.0.1 cmake pytest pybind11 scikit-build patchelf + - name: Install pykokkos-base + run: | + python install_base.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=1 + - name: Install pykokkos + run: | + python -m pip install . + - name: mypy check + run: | + mypy pykokkos + - name: import pykokkos + run: | + python examples/kokkos/01_hello_world.py diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 549cde70..0895c259 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -26,9 +26,8 @@ jobs: python -m pip install --upgrade pip python -m pip install --upgrade numpy mypy==1.0.1 cmake pytest pybind11 scikit-build patchelf - name: Install pykokkos-base - working-directory: base run: | - python setup.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=5 + python install_base.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=5 - name: Install pykokkos run: | python -m pip install . diff --git a/README.md b/README.md index c4a5dbe7..65f8fd5a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ # PyKokkos [![Python Testing](https://github.com/kokkos/pykokkos/actions/workflows/main_ci.yml/badge.svg)](https://github.com/kokkos/pykokkos/actions/workflows/main_ci.yml) [![Documentation](https://github.com/kokkos/pykokkos/actions/workflows/documentation.yml/badge.svg)](https://github.com/kokkos/pykokkos/actions/workflows/documentation.yml) +[![Linux](https://github.com/kokkos/pykokkos/actions/workflows/build_linux.yml/badge.svg)](https://github.com/kokkos/pykokkos/actions/workflows/build_linux.yml) +[![MacOS](https://github.com/kokkos/pykokkos/actions/workflows/build_macos.yml/badge.svg)](https://github.com/kokkos/pykokkos/actions/workflows/build_macos.yml) PyKokkos is a framework for writing high-performance Python code similar to Numba. In contrast to Numba, PyKokkos kernels are primarily diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 5c93c309..36db1eac 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -159,7 +159,7 @@ SET_TARGET_PROPERTIES(libpykokkos PROPERTIES # configure the rpath: :: IF(APPLE) SET_TARGET_PROPERTIES(libpykokkos PROPERTIES - MACOSX_RPATH "@loader_path/${LIB_RELPATH}:@loader_path:${_Kokkos_LIBDIR}:${CMAKE_INSTALL_RPATH}") + INSTALL_RPATH "@loader_path/${LIB_RELPATH};@loader_path;${_Kokkos_LIBDIR};${CMAKE_INSTALL_RPATH}") ELSEIF(UNIX) SET_TARGET_PROPERTIES(libpykokkos PROPERTIES INSTALL_RPATH "\$ORIGIN/${LIB_RELPATH}:\$ORIGIN:${_Kokkos_LIBDIR}:${CMAKE_INSTALL_RPATH}")