pyomp 0.3.2__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyomp-0.3.2 → pyomp-0.5.0}/.github/workflows/build-containers.yml +4 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/.github/workflows/build-upload-conda.yml +4 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/.github/workflows/build-upload-wheels.yml +29 -27
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitignore +1 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitlab/jobs/tioga.yml +2 -1
- pyomp-0.5.0/MANIFEST.in +1 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/PKG-INFO +18 -7
- {pyomp-0.3.2 → pyomp-0.5.0}/README.md +15 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/cibuildwheel/setup-miniconda3.sh +9 -7
- pyomp-0.5.0/buildscripts/conda-recipes/pyomp/conda_build_config.yaml +34 -0
- pyomp-0.5.0/buildscripts/conda-recipes/pyomp/meta.yaml +77 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/conda-recipes/pyomp/run_test.sh +9 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/gitlab/build-and-test.sh +12 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/hello-target.py +4 -2
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/ploop.1.py +5 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/pyproject.toml +31 -12
- pyomp-0.5.0/setup.py +288 -0
- pyomp-0.5.0/src/numba/openmp/__init__.py +106 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/_version.py +3 -3
- pyomp-0.5.0/src/numba/openmp/analysis.py +251 -0
- pyomp-0.5.0/src/numba/openmp/compiler.py +402 -0
- pyomp-0.5.0/src/numba/openmp/config.py +27 -0
- pyomp-0.5.0/src/numba/openmp/decorators.py +27 -0
- pyomp-0.5.0/src/numba/openmp/exceptions.py +26 -0
- pyomp-0.5.0/src/numba/openmp/ir_utils.py +4 -0
- {pyomp-0.3.2/src/numba/openmp/libs/libomp/patches → pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/14.0.6}/0001-BACKPORT-Fix-for-CUDA-OpenMP-RTL.patch +4 -15
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/14.0.6/0002-Fix-missing-includes.patch +12 -0
- {pyomp-0.3.2/src/numba/openmp/libs/libomp/patches → pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/14.0.6}/0003-Link-static-LLVM-libs.patch +3 -3
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/15.0.7/0001-Fix-missing-includes.patch +14 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/15.0.7/0002-Link-LLVM-statically.patch +101 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/15.0.7/0003-Disable-opaque-pointers-DeviceRTL-bitcode.patch +12 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/16.0.6/0001-Load-plugins-from-install-directory.patch +53 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/16.0.6/0002-Link-LLVM-statically.patch +218 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/20.1.8/0001-Enable-standalone-build.patch +13 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/20.1.8/0002-Link-statically-LLVM.patch +24 -0
- pyomp-0.5.0/src/numba/openmp/libs/openmp/patches/20.1.8/0003-Do-not-build-liboffload.patch +12 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/CGIntrinsicsOpenMP.cpp +399 -468
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/CGIntrinsicsOpenMP.h +58 -39
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/CMakeLists.txt +14 -6
- pyomp-0.5.0/src/numba/openmp/libs/pass/DebugOpenMP.cpp +17 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP.cpp +103 -62
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP.h +3 -4
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP_CAPI.h +2 -2
- pyomp-0.5.0/src/numba/openmp/link_utils.py +126 -0
- pyomp-0.5.0/src/numba/openmp/llvm_pass.py +48 -0
- pyomp-0.5.0/src/numba/openmp/llvmlite_extensions.py +75 -0
- pyomp-0.5.0/src/numba/openmp/omp_context.py +242 -0
- pyomp-0.5.0/src/numba/openmp/omp_grammar.py +696 -0
- pyomp-0.5.0/src/numba/openmp/omp_ir.py +2105 -0
- pyomp-0.5.0/src/numba/openmp/omp_lower.py +3125 -0
- pyomp-0.5.0/src/numba/openmp/omp_runtime.py +107 -0
- pyomp-0.5.0/src/numba/openmp/overloads.py +53 -0
- pyomp-0.5.0/src/numba/openmp/parser.py +6 -0
- pyomp-0.5.0/src/numba/openmp/tags.py +532 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/tests/test_openmp.py +38 -22
- {pyomp-0.3.2 → pyomp-0.5.0}/src/pyomp.egg-info/PKG-INFO +18 -7
- {pyomp-0.3.2 → pyomp-0.5.0}/src/pyomp.egg-info/SOURCES.txt +28 -3
- {pyomp-0.3.2 → pyomp-0.5.0}/src/pyomp.egg-info/requires.txt +1 -1
- {pyomp-0.3.2 → pyomp-0.5.0}/src/pyomp.egg-info/top_level.txt +0 -1
- pyomp-0.3.2/MANIFEST.in +0 -1
- pyomp-0.3.2/buildscripts/conda-recipes/pyomp/conda_build_config.yaml +0 -21
- pyomp-0.3.2/buildscripts/conda-recipes/pyomp/meta.yaml +0 -86
- pyomp-0.3.2/setup.py +0 -199
- pyomp-0.3.2/src/numba/openmp/__init__.py +0 -7852
- pyomp-0.3.2/src/numba/openmp/libs/libomp/patches/0002-Fix-missing-includes.patch +0 -12
- pyomp-0.3.2/src/numba/openmp/libs/pass/DebugOpenMP.cpp +0 -16
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitlab/custom-jobs-and-variables.yml +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitlab/subscribed-pipelines.yml +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitlab-ci.yml +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/.gitmodules +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/.readthedocs.yaml +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/LICENSE +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/LICENSE-OPENMP.txt +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/containers/Dockerfile +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/containers/examples/hello.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/containers/examples/pi_loop.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/containers/examples/pi_spmd.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/containers/examples/pi_task.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/buildscripts/gitlab/create-conda-pkgs.sh +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/Makefile +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/requirements.txt +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/source/conf.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/source/index.rst +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/source/installation.rst +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/source/openmp.rst +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/docs/source/usage.rst +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/TestDataEnv.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/dgemm_ompGPU.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/hello.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/piParLoopGPU_BUD.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/piParLoopGPU_BUD_combined.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/piParLoopGPU_loop.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/pi_loop.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/pi_spmd.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/examples/pi_task.py +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/setup.cfg +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/slides/PyOMP_SC24.pdf +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/numba/openmp/libs/pass/DebugOpenMP.h +0 -0
- {pyomp-0.3.2 → pyomp-0.5.0}/src/pyomp.egg-info/dependency_links.txt +0 -0
|
@@ -8,20 +8,20 @@ jobs:
|
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
10
|
- name: Set up QEMU
|
|
11
|
-
uses: docker/setup-qemu-action@
|
|
11
|
+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130
|
|
12
12
|
|
|
13
13
|
- name: Set up Docker Buildx
|
|
14
|
-
uses: docker/setup-buildx-action@
|
|
14
|
+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
|
|
15
15
|
|
|
16
16
|
- name: Login to GitHub Container Registry
|
|
17
|
-
uses: docker/login-action@
|
|
17
|
+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
|
|
18
18
|
with:
|
|
19
19
|
registry: ghcr.io
|
|
20
20
|
username: ${{ github.actor }}
|
|
21
21
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
22
22
|
|
|
23
23
|
- name: Build and push pyomp container
|
|
24
|
-
uses: docker/build-push-action@
|
|
24
|
+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
|
|
25
25
|
with:
|
|
26
26
|
platforms: linux/amd64,linux/arm64
|
|
27
27
|
file: buildscripts/containers/Dockerfile
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
matrix:
|
|
25
25
|
# TODO: Add windows.
|
|
26
26
|
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
|
|
27
|
-
python-version: ["3.
|
|
27
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
28
28
|
steps:
|
|
29
29
|
- name: Determine conda label
|
|
30
30
|
run: |
|
|
@@ -36,16 +36,16 @@ jobs:
|
|
|
36
36
|
echo "CONDA_LABEL=main" >> $GITHUB_ENV
|
|
37
37
|
fi
|
|
38
38
|
|
|
39
|
-
- uses: actions/checkout@
|
|
39
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
40
40
|
# Checkout the repo with history to get the commit hash for the build
|
|
41
41
|
# string.
|
|
42
42
|
with:
|
|
43
43
|
fetch-depth: 0
|
|
44
44
|
|
|
45
45
|
- name: Create and activate conda env
|
|
46
|
-
uses: conda-incubator/setup-miniconda@
|
|
46
|
+
uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167
|
|
47
47
|
with:
|
|
48
|
-
python-version: "3.
|
|
48
|
+
python-version: "3.12"
|
|
49
49
|
auto-update-conda: false
|
|
50
50
|
show-channel-urls: true
|
|
51
51
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
name: pypi
|
|
2
2
|
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
3
6
|
on:
|
|
4
7
|
release:
|
|
5
8
|
types: [published]
|
|
@@ -22,22 +25,26 @@ jobs:
|
|
|
22
25
|
# TODO: Add windows.
|
|
23
26
|
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
|
|
24
27
|
steps:
|
|
25
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
26
29
|
# Checkout the repo with history to get the commit hash for the build
|
|
27
30
|
# string.
|
|
28
31
|
with:
|
|
29
32
|
fetch-depth: 0
|
|
30
33
|
|
|
31
34
|
# Used to host cibuildwheel.
|
|
32
|
-
- uses: actions/setup-python@
|
|
35
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
33
36
|
|
|
34
37
|
- name: Install cibuildwheel
|
|
35
|
-
run: python -m pip install cibuildwheel==3.1
|
|
38
|
+
run: python -m pip install cibuildwheel==3.3.1
|
|
36
39
|
|
|
37
|
-
- name: Build wheels
|
|
40
|
+
- name: Build wheels {{ matrix.os }}
|
|
41
|
+
# Set LLVM_VERSION for the host to forward to the cibuildwheel
|
|
42
|
+
# environment.
|
|
43
|
+
env:
|
|
44
|
+
LLVM_VERSION: "20.1.8"
|
|
38
45
|
run: python -m cibuildwheel --output-dir wheelhouse
|
|
39
46
|
|
|
40
|
-
- uses: actions/upload-artifact@
|
|
47
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
41
48
|
with:
|
|
42
49
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
43
50
|
path: ./wheelhouse/*.whl
|
|
@@ -45,14 +52,16 @@ jobs:
|
|
|
45
52
|
build-sdist:
|
|
46
53
|
runs-on: ubuntu-latest
|
|
47
54
|
steps:
|
|
48
|
-
- uses: actions/checkout@
|
|
55
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
49
56
|
with:
|
|
50
57
|
fetch-depth: 0
|
|
51
58
|
|
|
52
59
|
- name: Build sdist
|
|
60
|
+
env:
|
|
61
|
+
LLVM_VERSION: "20.1.8"
|
|
53
62
|
run: pipx run build --sdist
|
|
54
63
|
|
|
55
|
-
- uses: actions/upload-artifact@
|
|
64
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
56
65
|
with:
|
|
57
66
|
name: cibw-sdist
|
|
58
67
|
path: dist/*.tar.gz
|
|
@@ -64,31 +73,24 @@ jobs:
|
|
|
64
73
|
strategy:
|
|
65
74
|
matrix:
|
|
66
75
|
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
|
|
67
|
-
python-version: ['3.
|
|
68
|
-
numba-version: ['0.
|
|
76
|
+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
|
|
77
|
+
numba-version: ['0.62.0', '0.62.1', '0.63.0', '0.63.1']
|
|
69
78
|
exclude:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
numba-version: '0.57.1'
|
|
76
|
-
|
|
77
|
-
# Numba 0.58 supports Python 3.8-3.11
|
|
78
|
-
- python-version: '3.12'
|
|
79
|
-
numba-version: '0.58.0'
|
|
80
|
-
- python-version: '3.12'
|
|
81
|
-
numba-version: '0.58.1'
|
|
79
|
+
- python-version: '3.14'
|
|
80
|
+
numba-version: '0.62.0'
|
|
81
|
+
- python-version: '3.14'
|
|
82
|
+
numba-version: '0.62.1'
|
|
83
|
+
|
|
82
84
|
steps:
|
|
83
85
|
- name: Download built wheels
|
|
84
|
-
uses: actions/download-artifact@
|
|
86
|
+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
|
|
85
87
|
with:
|
|
86
88
|
pattern: cibw-*
|
|
87
89
|
path: dist
|
|
88
90
|
merge-multiple: true
|
|
89
91
|
|
|
90
92
|
- name: Setup Python
|
|
91
|
-
uses: actions/setup-python@
|
|
93
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
92
94
|
with:
|
|
93
95
|
python-version: ${{ matrix.python-version }}
|
|
94
96
|
|
|
@@ -117,14 +119,14 @@ jobs:
|
|
|
117
119
|
permissions:
|
|
118
120
|
id-token: write
|
|
119
121
|
steps:
|
|
120
|
-
- uses: actions/download-artifact@
|
|
122
|
+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
|
|
121
123
|
with:
|
|
122
124
|
pattern: cibw-*
|
|
123
125
|
path: dist
|
|
124
126
|
merge-multiple: true
|
|
125
127
|
|
|
126
128
|
- name: Publish testpypi
|
|
127
|
-
uses: pypa/gh-action-pypi-publish@
|
|
129
|
+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
|
|
128
130
|
with:
|
|
129
131
|
repository-url: https://test.pypi.org/legacy/
|
|
130
132
|
verbose: true
|
|
@@ -138,13 +140,13 @@ jobs:
|
|
|
138
140
|
permissions:
|
|
139
141
|
id-token: write
|
|
140
142
|
steps:
|
|
141
|
-
- uses: actions/download-artifact@
|
|
143
|
+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
|
|
142
144
|
with:
|
|
143
145
|
pattern: cibw-*
|
|
144
146
|
path: dist
|
|
145
147
|
merge-multiple: true
|
|
146
148
|
|
|
147
149
|
- name: Publish pypi
|
|
148
|
-
uses: pypa/gh-action-pypi-publish@
|
|
150
|
+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
|
|
149
151
|
with:
|
|
150
152
|
verbose: true
|
pyomp-0.5.0/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include src/numba/openmp/libs *.py *.so *.a *.bc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyomp
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Python OpenMP library based on Numba
|
|
5
5
|
Maintainer-email: Giorgis Georgakoudis <georgakoudis1@llnl.gov>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -11,11 +11,11 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Topic :: Software Development :: Compilers
|
|
14
|
-
Requires-Python: <3.
|
|
14
|
+
Requires-Python: <3.15,>=3.10
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
License-File: LICENSE-OPENMP.txt
|
|
18
|
-
Requires-Dist: numba<0.
|
|
18
|
+
Requires-Dist: numba<0.64,>=0.62
|
|
19
19
|
Requires-Dist: lark
|
|
20
20
|
Requires-Dist: cffi
|
|
21
21
|
Requires-Dist: setuptools
|
|
@@ -36,14 +36,17 @@ compiler based on LLVM, which is competitive with equivalent C/C++ implementatio
|
|
|
36
36
|
|
|
37
37
|
PyOMP is developed and distributed as an *extension* to Numba, so it uses
|
|
38
38
|
Numba as a dependency.
|
|
39
|
-
It is currently tested with Numba versions
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
It is currently tested with several Numba versions on the following
|
|
40
|
+
architecture and operating system combinations: linux-64 (x86_64), osx-arm64
|
|
41
|
+
(mac), and linux-arm64.
|
|
42
|
+
The [compatibility matrix](#compatibility-matrix) with Numba versions records
|
|
43
|
+
the possible combinations.
|
|
44
|
+
|
|
42
45
|
Installation is possible through `pip` or `conda`, detailed in the next section.
|
|
43
46
|
|
|
44
47
|
As PyOMP builds on top of the LLVM OpenMP infrastructure, it also inherits its
|
|
45
48
|
limitations: GPU support is only available on Linux.
|
|
46
|
-
Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support
|
|
49
|
+
Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support in development.
|
|
47
50
|
|
|
48
51
|
## Installation
|
|
49
52
|
|
|
@@ -61,6 +64,14 @@ PyOMP is also distributed through Conda, installable using the following command
|
|
|
61
64
|
conda install -c python-for-hpc -c conda-forge pyomp
|
|
62
65
|
```
|
|
63
66
|
|
|
67
|
+
### Compatibility matrix
|
|
68
|
+
|
|
69
|
+
| PyOMP | Numba |
|
|
70
|
+
| ----- | --------------- |
|
|
71
|
+
| 0.5.x | 0.62.x - 0.63.x |
|
|
72
|
+
| 0.4.x | 0.61.x |
|
|
73
|
+
| 0.3.x | 0.57.x - 0.60.x |
|
|
74
|
+
|
|
64
75
|
Besides a standard installation, we also provide the following options to
|
|
65
76
|
quickly try out PyOMP online or through a container.
|
|
66
77
|
|
|
@@ -13,14 +13,17 @@ compiler based on LLVM, which is competitive with equivalent C/C++ implementatio
|
|
|
13
13
|
|
|
14
14
|
PyOMP is developed and distributed as an *extension* to Numba, so it uses
|
|
15
15
|
Numba as a dependency.
|
|
16
|
-
It is currently tested with Numba versions
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
It is currently tested with several Numba versions on the following
|
|
17
|
+
architecture and operating system combinations: linux-64 (x86_64), osx-arm64
|
|
18
|
+
(mac), and linux-arm64.
|
|
19
|
+
The [compatibility matrix](#compatibility-matrix) with Numba versions records
|
|
20
|
+
the possible combinations.
|
|
21
|
+
|
|
19
22
|
Installation is possible through `pip` or `conda`, detailed in the next section.
|
|
20
23
|
|
|
21
24
|
As PyOMP builds on top of the LLVM OpenMP infrastructure, it also inherits its
|
|
22
25
|
limitations: GPU support is only available on Linux.
|
|
23
|
-
Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support
|
|
26
|
+
Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support in development.
|
|
24
27
|
|
|
25
28
|
## Installation
|
|
26
29
|
|
|
@@ -38,6 +41,14 @@ PyOMP is also distributed through Conda, installable using the following command
|
|
|
38
41
|
conda install -c python-for-hpc -c conda-forge pyomp
|
|
39
42
|
```
|
|
40
43
|
|
|
44
|
+
### Compatibility matrix
|
|
45
|
+
|
|
46
|
+
| PyOMP | Numba |
|
|
47
|
+
| ----- | --------------- |
|
|
48
|
+
| 0.5.x | 0.62.x - 0.63.x |
|
|
49
|
+
| 0.4.x | 0.61.x |
|
|
50
|
+
| 0.3.x | 0.57.x - 0.60.x |
|
|
51
|
+
|
|
41
52
|
Besides a standard installation, we also provide the following options to
|
|
42
53
|
quickly try out PyOMP online or through a container.
|
|
43
54
|
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
set -euxo pipefail
|
|
4
4
|
|
|
5
|
+
# Read LLVM_VERSION from environment and error if not set
|
|
6
|
+
if [ -z "${LLVM_VERSION:-}" ]; then
|
|
7
|
+
echo "Error: LLVM_VERSION environment variable is not set." >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
5
11
|
if [ "$(uname)" = "Darwin" ]; then
|
|
6
12
|
OS_NAME="MacOSX"
|
|
7
13
|
else
|
|
@@ -17,10 +23,6 @@ echo "Miniconda installed"
|
|
|
17
23
|
source "_stage/miniconda3/bin/activate" base
|
|
18
24
|
export CONDA_PLUGINS_AUTO_ACCEPT_TOS=true
|
|
19
25
|
|
|
20
|
-
# Create
|
|
21
|
-
echo "Installing
|
|
22
|
-
conda create -n llvmdev -c conda-forge -y llvmdev
|
|
23
|
-
|
|
24
|
-
# Create clang14 environment and install clang 14.0.6.
|
|
25
|
-
echo "Installing clang 14.0.6..."
|
|
26
|
-
conda create -n clang14 -c conda-forge -y clang=14.0.6
|
|
26
|
+
# Create conda environment with tools and libraries for the LLVM_VERSION.
|
|
27
|
+
echo "Installing llvmdev ${LLVM_VERSION}..."
|
|
28
|
+
conda create -n llvmdev-${LLVM_VERSION} -c conda-forge -q -y clang=${LLVM_VERSION} clangxx=${LLVM_VERSION} clang-tools=${LLVM_VERSION} llvmdev=${LLVM_VERSION} zstd
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# --- Compilers ---
|
|
2
|
+
c_compiler_version:
|
|
3
|
+
- 9 # [linux]
|
|
4
|
+
- 14 # [osx]
|
|
5
|
+
|
|
6
|
+
cxx_compiler_version:
|
|
7
|
+
- 9 # [linux]
|
|
8
|
+
- 14 # [osx]
|
|
9
|
+
|
|
10
|
+
fortran_compiler_version:
|
|
11
|
+
- 9 # [linux]
|
|
12
|
+
|
|
13
|
+
cxx_compiler: # [osx]
|
|
14
|
+
- clang_bootstrap # [osx]
|
|
15
|
+
|
|
16
|
+
c_compiler: # [osx]
|
|
17
|
+
- clang_bootstrap # [osx]
|
|
18
|
+
|
|
19
|
+
# Sysroots for compatibility on Linux builds.
|
|
20
|
+
sysroot_linux_64:
|
|
21
|
+
- 2.17 # [linux64]
|
|
22
|
+
|
|
23
|
+
sysroot_linux_aarch64:
|
|
24
|
+
- 2.17 # [aarch64]
|
|
25
|
+
|
|
26
|
+
# --- MACOS DEPLOYMENT TARGET ---
|
|
27
|
+
# Sets minimum OS version to Big Sur (11.0) for Mac builds.
|
|
28
|
+
MACOSX_DEPLOYMENT_TARGET:
|
|
29
|
+
- 11.0 # [osx]
|
|
30
|
+
|
|
31
|
+
# --- MACOS SDK ---
|
|
32
|
+
# We use a newer SDK (e.g. 11.3) to build, even if targeting 11.0
|
|
33
|
+
MACOSX_SDK_VERSION:
|
|
34
|
+
- 11.3 # [osx]
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0').lstrip('v') %}
|
|
2
|
+
{% set LLVM_VERSION = environ.get('LLVM_VERSION', '20.1.8') %}
|
|
3
|
+
|
|
4
|
+
package:
|
|
5
|
+
name: pyomp
|
|
6
|
+
version: {{ version }}
|
|
7
|
+
|
|
8
|
+
source:
|
|
9
|
+
path: ../../..
|
|
10
|
+
|
|
11
|
+
build:
|
|
12
|
+
string: py{{ PY_VER }}h{{ PKG_HASH }}_{{GIT_DESCRIBE_HASH}}_{{ GIT_DESCRIBE_NUMBER }}
|
|
13
|
+
script_env:
|
|
14
|
+
- PY_VCRUNTIME_REDIST # [win]
|
|
15
|
+
script:
|
|
16
|
+
- export LLVM_VERSION={{ LLVM_VERSION }}
|
|
17
|
+
- export LLVM_DIR=${PREFIX}
|
|
18
|
+
- export CC=${PREFIX}/bin/clang
|
|
19
|
+
- export CXX=${PREFIX}/bin/clang++
|
|
20
|
+
- export VERBOSE=1
|
|
21
|
+
- export CPPFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -isystem ${PREFIX}/include -D_FORTIFY_SOURCE=2" # [osx]
|
|
22
|
+
- export ENABLE_BUNDLED_LIBOMPTARGET=1 # [linux]
|
|
23
|
+
- rm -rf build dist src/*.egg-info
|
|
24
|
+
- {{ PYTHON }} -m pip install -v .
|
|
25
|
+
|
|
26
|
+
requirements:
|
|
27
|
+
build:
|
|
28
|
+
- {{ compiler('c') }}
|
|
29
|
+
- {{ compiler('cxx') }}
|
|
30
|
+
# Add sysroot to ensure compatibility on linux builds.
|
|
31
|
+
- sysroot_linux-64 # [linux64]
|
|
32
|
+
- sysroot_linux-aarch64 # [aarch64]
|
|
33
|
+
- cmake
|
|
34
|
+
- ninja
|
|
35
|
+
- setuptools_scm
|
|
36
|
+
- elfutils # [linux]
|
|
37
|
+
- libffi # [linux]
|
|
38
|
+
host:
|
|
39
|
+
- python
|
|
40
|
+
- pip
|
|
41
|
+
# Add sysroot to ensure compatibility on linux builds.
|
|
42
|
+
- sysroot_linux-64 # [linux64]
|
|
43
|
+
- sysroot_linux-aarch64 # [aarch64]
|
|
44
|
+
- setuptools
|
|
45
|
+
- setuptools_scm
|
|
46
|
+
- numba >=0.62, <0.64
|
|
47
|
+
- clang {{ LLVM_VERSION }}
|
|
48
|
+
- clangxx {{ LLVM_VERSION }}
|
|
49
|
+
- clang-tools {{ LLVM_VERSION }}
|
|
50
|
+
- llvmdev {{ LLVM_VERSION }}
|
|
51
|
+
- zlib
|
|
52
|
+
# require llvm-openmp for the openmp cpu runtime.
|
|
53
|
+
- llvm-openmp {{ LLVM_VERSION }}
|
|
54
|
+
- elfutils # [linux]
|
|
55
|
+
- libffi # [linux]
|
|
56
|
+
run:
|
|
57
|
+
- python
|
|
58
|
+
- setuptools
|
|
59
|
+
- numba >=0.62, <0.64
|
|
60
|
+
# require llvm-openmp for the openmp cpu runtime.
|
|
61
|
+
- llvm-openmp {{ LLVM_VERSION }}
|
|
62
|
+
- lark
|
|
63
|
+
- cffi
|
|
64
|
+
|
|
65
|
+
test:
|
|
66
|
+
commands:
|
|
67
|
+
- test -f $SP_DIR/numba/openmp/libs/pass/libIntrinsicsOpenMP.dylib # [osx]
|
|
68
|
+
- test -f $SP_DIR/numba/openmp/libs/pass/libIntrinsicsOpenMP.so # [linux]
|
|
69
|
+
- test -f $SP_DIR/numba/openmp/libs/openmp/lib/libomptarget-amdgpu.bc # [linux]
|
|
70
|
+
- test -f $SP_DIR/numba/openmp/libs/openmp/lib/libomptarget-nvptx.bc # [linux]
|
|
71
|
+
- test -f $SP_DIR/numba/openmp/libs/openmp/lib/libomptarget.so # [linux]
|
|
72
|
+
|
|
73
|
+
about:
|
|
74
|
+
home: https://github.com/Python-for-HPC/PyOMP
|
|
75
|
+
license: BSD-2-Clause
|
|
76
|
+
license_file: LICENSE
|
|
77
|
+
summary: "PyOMP: OpenMP for portable CPU/GPU parallel programming in Python using Numba."
|
|
@@ -54,8 +54,13 @@ TEST_DEVICES=0 RUN_TARGET=0 $SEGVCATCH python -m numba.runtests -v -- numba.open
|
|
|
54
54
|
echo "=> Run OpenMP offloading tests on CPU (device 1)"
|
|
55
55
|
echo "=> Running: TEST_DEVICES=1 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget"
|
|
56
56
|
OMP_TARGET_OFFLOAD=mandatory TEST_DEVICES=1 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget 2>&1
|
|
57
|
-
if
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
# Check if NVIDIA GPU is present.
|
|
58
|
+
if command -v nvidia-smi >/dev/null 2>&1; then
|
|
59
|
+
# `nvidia-smi --list-gpus` exits non-zero when no GPUs are present; run
|
|
60
|
+
# it in a conditional so `set -e` does not cause the script to exit.
|
|
61
|
+
if nvidia-smi --list-gpus >/dev/null 2>&1; then
|
|
62
|
+
echo "=> Found NVIDIA GPU, Run OpenMP offloading tests on GPU (device 0)"
|
|
63
|
+
echo "=> Running: TEST_DEVICES=0 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget"
|
|
64
|
+
OMP_TARGET_OFFLOAD=mandatory TEST_DEVICES=0 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget 2>&1
|
|
65
|
+
fi
|
|
61
66
|
fi
|
|
@@ -4,24 +4,32 @@ set -e
|
|
|
4
4
|
|
|
5
5
|
# Create a unique temporary directory for this job.
|
|
6
6
|
TMPDIR=/tmp/pyomp/${CI_JOB_ID}
|
|
7
|
+
rm -rf ${TMPDIR}
|
|
7
8
|
mkdir -p ${TMPDIR}
|
|
8
9
|
pushd ${TMPDIR}
|
|
9
10
|
|
|
11
|
+
# Set the LLVM_VERSION to use.
|
|
12
|
+
export LLVM_VERSION="20.1.8"
|
|
13
|
+
|
|
10
14
|
# Set the envs directory under the temporary directory.
|
|
11
15
|
export CONDA_ENVS_DIRS="${TMPDIR}/_stage/miniconda3/envs"
|
|
12
16
|
|
|
13
|
-
# Install miniconda and llvmdev
|
|
17
|
+
# Install miniconda and llvmdev environment.
|
|
14
18
|
source ${CI_PROJECT_DIR}/buildscripts/cibuildwheel/setup-miniconda3.sh
|
|
15
19
|
|
|
16
20
|
# Export environment variables for building and testing.
|
|
17
|
-
export
|
|
18
|
-
export
|
|
21
|
+
export ENABLE_BUNDLED_LIBOMP="1"
|
|
22
|
+
export ENABLE_BUNDLED_LIBOMPTARGET="1"
|
|
23
|
+
export LLVM_DIR="${CONDA_ENVS_DIRS}/llvmdev-${LLVM_VERSION}"
|
|
24
|
+
export CMAKE_PREFIX_PATH="${CONDA_PREFIX}"
|
|
19
25
|
export USE_CXX11_ABI="1"
|
|
20
26
|
export PIP_NO_INPUT="1"
|
|
21
27
|
|
|
22
28
|
# Create and activate a conda environment with the desired Python version.
|
|
23
29
|
conda create -n py-${PYOMP_CI_PYTHON_VERSION} -c conda-forge -y python=${PYOMP_CI_PYTHON_VERSION}
|
|
24
30
|
conda activate py-${PYOMP_CI_PYTHON_VERSION}
|
|
31
|
+
# Add extra packages needed to build openmp libraries.
|
|
32
|
+
conda install -c conda-forge -y zstd libffi
|
|
25
33
|
|
|
26
34
|
# Clone and fetch the commit with history for package versioning.
|
|
27
35
|
git clone https://github.com/${GITHUB_PROJECT_ORG}/${GITHUB_PROJECT_NAME}.git --single-branch
|
|
@@ -30,7 +38,7 @@ git fetch origin ${CI_COMMIT_SHA}
|
|
|
30
38
|
git checkout ${CI_COMMIT_SHA}
|
|
31
39
|
|
|
32
40
|
# Install pyomp.
|
|
33
|
-
CC=
|
|
41
|
+
CC=clang CXX=clang++ python -m pip install -v .
|
|
34
42
|
|
|
35
43
|
# Run host OpenMP tests.
|
|
36
44
|
TEST_DEVICES=0 RUN_TARGET=0 python -m numba.runtests -v -- numba.openmp.tests.test_openmp
|
|
@@ -2,9 +2,11 @@ from numba.openmp import njit
|
|
|
2
2
|
from numba.openmp import openmp_context as openmp
|
|
3
3
|
from numba.openmp import omp_get_num_threads, omp_get_thread_num
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
@njit
|
|
6
7
|
def hello():
|
|
7
|
-
with openmp("target device(
|
|
8
|
-
print("hello thread", omp_get_thread_num(),"of", omp_get_num_threads())
|
|
8
|
+
with openmp("target device(0)"):
|
|
9
|
+
print("hello thread", omp_get_thread_num(), "of", omp_get_num_threads())
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
hello()
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
from numba.openmp import njit
|
|
2
2
|
from numba.openmp import openmp_context as openmp
|
|
3
|
-
from numba.openmp import omp_set_num_threads, omp_get_thread_num, omp_get_num_threads, omp_get_wtime
|
|
4
3
|
import numpy as np
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
@njit
|
|
7
7
|
def simple(n, a, b):
|
|
8
8
|
with openmp("parallel for"):
|
|
9
9
|
for i in range(1, n):
|
|
10
|
-
b[i] = (a[i] + a[i-1]) / 2.0
|
|
10
|
+
b[i] = (a[i] + a[i - 1]) / 2.0
|
|
11
|
+
|
|
11
12
|
|
|
12
13
|
a = np.ones(100)
|
|
13
14
|
b = np.empty(len(a))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=75.3", "
|
|
2
|
+
requires = ["setuptools>=75.3", "setuptools-scm>=8", "cmake>=3.20", "ninja"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
@@ -7,7 +7,7 @@ name = "pyomp"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "Python OpenMP library based on Numba"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10, <3.15"
|
|
11
11
|
license = "BSD-2-Clause"
|
|
12
12
|
license-files = ["LICENSE", "LICENSE-OPENMP.txt"]
|
|
13
13
|
classifiers = [
|
|
@@ -17,7 +17,7 @@ classifiers = [
|
|
|
17
17
|
"Intended Audience :: Developers",
|
|
18
18
|
"Topic :: Software Development :: Compilers",
|
|
19
19
|
]
|
|
20
|
-
dependencies = ["numba>=0.
|
|
20
|
+
dependencies = ["numba>=0.62, <0.64", "lark", "cffi", "setuptools"]
|
|
21
21
|
maintainers = [
|
|
22
22
|
{ name = "Giorgis Georgakoudis", email = "georgakoudis1@llnl.gov" },
|
|
23
23
|
]
|
|
@@ -37,7 +37,7 @@ include = ["numba.openmp*"]
|
|
|
37
37
|
|
|
38
38
|
# Bundle the CMake-installed artifacts into the wheel.
|
|
39
39
|
[tool.setuptools.package-data]
|
|
40
|
-
"numba.openmp.libs" = ["pass/*", "
|
|
40
|
+
"numba.openmp.libs" = ["pass/*", "openmp/**/*"]
|
|
41
41
|
|
|
42
42
|
# setuptools-scm config
|
|
43
43
|
[tool.setuptools_scm]
|
|
@@ -46,8 +46,9 @@ local_scheme = "no-local-version"
|
|
|
46
46
|
|
|
47
47
|
[tool.cibuildwheel]
|
|
48
48
|
archs = ["native"]
|
|
49
|
+
# Pass LLVM_VERSION from the host environment to cibuildwheel.
|
|
50
|
+
environment-pass = ["LLVM_VERSION"]
|
|
49
51
|
# We use miniconda3 to get the clang/llvm toolchain on Linux.
|
|
50
|
-
before-all = ["bash buildscripts/cibuildwheel/setup-miniconda3.sh"]
|
|
51
52
|
before-build = ["rm -rf build dist src/*.egg-info"]
|
|
52
53
|
skip = ["*-musllinux_*", "cp38-*"]
|
|
53
54
|
test-command = [
|
|
@@ -57,14 +58,32 @@ test-command = [
|
|
|
57
58
|
"OMP_TARGET_OFFLOAD=mandatory TEST_DEVICES=1 RUN_TARGET=1 python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget",
|
|
58
59
|
]
|
|
59
60
|
|
|
61
|
+
[tool.cibuildwheel.environment]
|
|
62
|
+
USE_CXX11_ABI = "1"
|
|
63
|
+
PIP_NO_INPUT = "1"
|
|
64
|
+
|
|
60
65
|
[tool.cibuildwheel.linux]
|
|
61
66
|
before-all = [
|
|
62
|
-
"yum install -y elfutils-libelf-devel libffi-devel",
|
|
63
|
-
"bash buildscripts/cibuildwheel/setup-miniconda3.sh",
|
|
67
|
+
"yum install -y elfutils-libelf-devel libffi-devel clang-devel-20.1.8 llvm-devel-20.1.8",
|
|
64
68
|
]
|
|
65
69
|
|
|
66
|
-
[tool.cibuildwheel.environment]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
[tool.cibuildwheel.linux.environment]
|
|
71
|
+
ENABLE_BUNDLED_LIBOMP = "1"
|
|
72
|
+
ENABLE_BUNDLED_LIBOMPTARGET = "1"
|
|
73
|
+
LLVM_DIR = "/usr/lib64/cmake/llvm"
|
|
74
|
+
CC = "/usr/bin/clang"
|
|
75
|
+
CXX = "/usr/bin/clang++"
|
|
76
|
+
|
|
77
|
+
[tool.cibuildwheel.macos]
|
|
78
|
+
before-all = ["bash buildscripts/cibuildwheel/setup-miniconda3.sh"]
|
|
79
|
+
|
|
80
|
+
[tool.cibuildwheel.macos.environment]
|
|
81
|
+
ENABLE_BUNDLED_LIBOMP = "1"
|
|
82
|
+
LLVM_DIR = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}/lib/cmake/llvm"
|
|
83
|
+
CC = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}/bin/clang"
|
|
84
|
+
CXX = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}/bin/clang++"
|
|
85
|
+
# Set the deplioyment target to macOS 11.0.
|
|
86
|
+
MACOSX_DEPLOYMENT_TARGET = "11.0"
|
|
87
|
+
# Set the cmake prefix path to find libraries in the conda environment which is
|
|
88
|
+
# compatible with the macos target.
|
|
89
|
+
CMAKE_PREFIX_PATH = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}/"
|