Skip to content

Add MKLMemory class to expose MKL allocated memory via Python buffer protocol #662

Add MKLMemory class to expose MKL allocated memory via Python buffer protocol

Add MKLMemory class to expose MKL allocated memory via Python buffer protocol #662

name: Build project with IntelLLVM clang compiler
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
build-with-clang:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15"]
env:
ONEAPI_ROOT: /opt/intel/oneapi
defaults:
run:
shell: bash -el {0}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
with:
access_token: ${{ github.token }}
- name: Add Intel repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
- name: Install Intel oneAPI
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
sudo apt-get install intel-oneapi-mkl-devel
- name: Setup Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
# allow the 3.15 release candidate until 3.15 is final
allow-prereleases: true
architecture: x64
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Install mkl-service dependencies
run: |
pip install meson-python "cython>=3.1.0" cmake ninja
- name: List oneAPI folder content
run: ls ${{ env.ONEAPI_ROOT }}/compiler
- name: Build mkl-service
run: |
source ${{ env.ONEAPI_ROOT }}/setvars.sh
echo "$CMPLR_ROOT"
export CC="$CMPLR_ROOT/bin/icx"
export CFLAGS="${CFLAGS} -fno-fast-math"
pip install . --no-build-isolation --no-deps --verbose
- name: Run mkl-service tests
run: |
source ${{ env.ONEAPI_ROOT }}/setvars.sh
pip install pytest
pytest -s -v --pyargs mkl