-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.91 KB
/
Copy pathopenblas-action.yml
File metadata and controls
62 lines (53 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: OpenBLAS ACTION kernels
on:
pull_request:
paths:
- "src/libactionet/**"
- "src/actionet/action/**"
- "src/actionet/bindings/wp_action.cpp"
- "tests/test_action_small_dense_kernels.py"
- ".github/workflows/openblas-action.yml"
workflow_dispatch:
jobs:
action-openblas:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
threading: [pthread, openmp]
env:
OMP_NUM_THREADS: "8"
OPENBLAS_NUM_THREADS: "32"
ACTIONET_RUN_OPENBLAS_SMOKE: "1"
LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/openblas-${{ matrix.threading }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-dev libopenblas-${{ matrix.threading }}-dev
- name: Build against selected OpenBLAS variant
env:
CMAKE_ARGS: >-
-DBLA_VENDOR=OpenBLAS
-DBLAS_openblas_LIBRARY=/usr/lib/x86_64-linux-gnu/openblas-${{ matrix.threading }}/libopenblas.so
-DLIBACTIONET_OPENMP_RUNTIME=GNU
run: |
python -m pip install --upgrade pip
python -m pip install . pytest
- name: Verify resolved BLAS and OpenMP linkage
run: |
extension=$(python -c 'from actionet import _core; print(_core.__file__)')
ldd "$extension"
ldd "$extension" | grep -q 'openblas'
resolved=$(ldd "$extension" | awk '/openblas/ {print $3; exit}')
readlink -f "$resolved" | grep -q 'openblas-${{ matrix.threading }}'
ldd "$extension" | grep -q 'libgomp'
- name: Run ACTION correctness and catastrophic-regression tests
run: python -m pytest -q tests/test_action_small_dense_kernels.py