pyomp 0.3.2__tar.gz → 0.4.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.
Files changed (93) hide show
  1. {pyomp-0.3.2 → pyomp-0.4.0}/.github/workflows/build-containers.yml +4 -4
  2. {pyomp-0.3.2 → pyomp-0.4.0}/.github/workflows/build-upload-conda.yml +4 -4
  3. {pyomp-0.3.2 → pyomp-0.4.0}/.github/workflows/build-upload-wheels.yml +23 -27
  4. {pyomp-0.3.2 → pyomp-0.4.0}/.gitignore +1 -0
  5. {pyomp-0.3.2 → pyomp-0.4.0}/.gitlab/jobs/tioga.yml +1 -1
  6. {pyomp-0.3.2 → pyomp-0.4.0}/PKG-INFO +17 -7
  7. {pyomp-0.3.2 → pyomp-0.4.0}/README.md +14 -4
  8. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/cibuildwheel/setup-miniconda3.sh +9 -7
  9. pyomp-0.4.0/buildscripts/conda-recipes/pyomp/conda_build_config.yaml +34 -0
  10. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/conda-recipes/pyomp/meta.yaml +39 -29
  11. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/conda-recipes/pyomp/run_test.sh +9 -4
  12. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/gitlab/build-and-test.sh +6 -3
  13. {pyomp-0.3.2 → pyomp-0.4.0}/examples/hello-target.py +4 -2
  14. {pyomp-0.3.2 → pyomp-0.4.0}/pyproject.toml +6 -4
  15. {pyomp-0.3.2 → pyomp-0.4.0}/setup.py +69 -58
  16. pyomp-0.4.0/src/numba/openmp/__init__.py +86 -0
  17. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/_version.py +3 -3
  18. pyomp-0.4.0/src/numba/openmp/analysis.py +251 -0
  19. pyomp-0.4.0/src/numba/openmp/compiler.py +390 -0
  20. pyomp-0.4.0/src/numba/openmp/config.py +26 -0
  21. pyomp-0.4.0/src/numba/openmp/decorators.py +27 -0
  22. pyomp-0.4.0/src/numba/openmp/exceptions.py +26 -0
  23. pyomp-0.4.0/src/numba/openmp/ir_utils.py +4 -0
  24. {pyomp-0.3.2/src/numba/openmp/libs/libomp/patches → pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/14.0.6}/0001-BACKPORT-Fix-for-CUDA-OpenMP-RTL.patch +4 -15
  25. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/14.0.6/0002-Fix-missing-includes.patch +12 -0
  26. {pyomp-0.3.2/src/numba/openmp/libs/libomp/patches → pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/14.0.6}/0003-Link-static-LLVM-libs.patch +3 -3
  27. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/15.0.7/0001-Fix-missing-includes.patch +14 -0
  28. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/15.0.7/0002-Link-LLVM-statically.patch +101 -0
  29. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/15.0.7/0003-Disable-opaque-pointers-DeviceRTL-bitcode.patch +12 -0
  30. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/16.0.6/0001-Load-plugins-from-install-directory.patch +53 -0
  31. pyomp-0.4.0/src/numba/openmp/libs/libomp/patches/16.0.6/0002-Link-LLVM-statically.patch +218 -0
  32. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/CGIntrinsicsOpenMP.cpp +245 -289
  33. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/CGIntrinsicsOpenMP.h +57 -38
  34. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/CMakeLists.txt +12 -4
  35. pyomp-0.4.0/src/numba/openmp/libs/pass/DebugOpenMP.cpp +17 -0
  36. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP.cpp +82 -47
  37. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP.h +3 -4
  38. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/IntrinsicsOpenMP_CAPI.h +2 -2
  39. pyomp-0.4.0/src/numba/openmp/link_utils.py +126 -0
  40. pyomp-0.4.0/src/numba/openmp/llvm_pass.py +46 -0
  41. pyomp-0.4.0/src/numba/openmp/llvmlite_extensions.py +75 -0
  42. pyomp-0.4.0/src/numba/openmp/omp_context.py +242 -0
  43. pyomp-0.4.0/src/numba/openmp/omp_grammar.py +696 -0
  44. pyomp-0.4.0/src/numba/openmp/omp_ir.py +2089 -0
  45. pyomp-0.4.0/src/numba/openmp/omp_lower.py +3124 -0
  46. pyomp-0.4.0/src/numba/openmp/omp_runtime.py +107 -0
  47. pyomp-0.4.0/src/numba/openmp/overloads.py +53 -0
  48. pyomp-0.4.0/src/numba/openmp/parser.py +6 -0
  49. pyomp-0.4.0/src/numba/openmp/tags.py +532 -0
  50. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/tests/test_openmp.py +37 -15
  51. {pyomp-0.3.2 → pyomp-0.4.0}/src/pyomp.egg-info/PKG-INFO +17 -7
  52. {pyomp-0.3.2 → pyomp-0.4.0}/src/pyomp.egg-info/SOURCES.txt +25 -3
  53. {pyomp-0.3.2 → pyomp-0.4.0}/src/pyomp.egg-info/requires.txt +1 -1
  54. pyomp-0.3.2/buildscripts/conda-recipes/pyomp/conda_build_config.yaml +0 -21
  55. pyomp-0.3.2/src/numba/openmp/__init__.py +0 -7852
  56. pyomp-0.3.2/src/numba/openmp/libs/libomp/patches/0002-Fix-missing-includes.patch +0 -12
  57. pyomp-0.3.2/src/numba/openmp/libs/pass/DebugOpenMP.cpp +0 -16
  58. {pyomp-0.3.2 → pyomp-0.4.0}/.gitlab/custom-jobs-and-variables.yml +0 -0
  59. {pyomp-0.3.2 → pyomp-0.4.0}/.gitlab/subscribed-pipelines.yml +0 -0
  60. {pyomp-0.3.2 → pyomp-0.4.0}/.gitlab-ci.yml +0 -0
  61. {pyomp-0.3.2 → pyomp-0.4.0}/.gitmodules +0 -0
  62. {pyomp-0.3.2 → pyomp-0.4.0}/.readthedocs.yaml +0 -0
  63. {pyomp-0.3.2 → pyomp-0.4.0}/LICENSE +0 -0
  64. {pyomp-0.3.2 → pyomp-0.4.0}/LICENSE-OPENMP.txt +0 -0
  65. {pyomp-0.3.2 → pyomp-0.4.0}/MANIFEST.in +0 -0
  66. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/containers/Dockerfile +0 -0
  67. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/containers/examples/hello.py +0 -0
  68. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/containers/examples/pi_loop.py +0 -0
  69. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/containers/examples/pi_spmd.py +0 -0
  70. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/containers/examples/pi_task.py +0 -0
  71. {pyomp-0.3.2 → pyomp-0.4.0}/buildscripts/gitlab/create-conda-pkgs.sh +0 -0
  72. {pyomp-0.3.2 → pyomp-0.4.0}/docs/Makefile +0 -0
  73. {pyomp-0.3.2 → pyomp-0.4.0}/docs/requirements.txt +0 -0
  74. {pyomp-0.3.2 → pyomp-0.4.0}/docs/source/conf.py +0 -0
  75. {pyomp-0.3.2 → pyomp-0.4.0}/docs/source/index.rst +0 -0
  76. {pyomp-0.3.2 → pyomp-0.4.0}/docs/source/installation.rst +0 -0
  77. {pyomp-0.3.2 → pyomp-0.4.0}/docs/source/openmp.rst +0 -0
  78. {pyomp-0.3.2 → pyomp-0.4.0}/docs/source/usage.rst +0 -0
  79. {pyomp-0.3.2 → pyomp-0.4.0}/examples/TestDataEnv.py +0 -0
  80. {pyomp-0.3.2 → pyomp-0.4.0}/examples/dgemm_ompGPU.py +0 -0
  81. {pyomp-0.3.2 → pyomp-0.4.0}/examples/hello.py +0 -0
  82. {pyomp-0.3.2 → pyomp-0.4.0}/examples/piParLoopGPU_BUD.py +0 -0
  83. {pyomp-0.3.2 → pyomp-0.4.0}/examples/piParLoopGPU_BUD_combined.py +0 -0
  84. {pyomp-0.3.2 → pyomp-0.4.0}/examples/piParLoopGPU_loop.py +0 -0
  85. {pyomp-0.3.2 → pyomp-0.4.0}/examples/pi_loop.py +0 -0
  86. {pyomp-0.3.2 → pyomp-0.4.0}/examples/pi_spmd.py +0 -0
  87. {pyomp-0.3.2 → pyomp-0.4.0}/examples/pi_task.py +0 -0
  88. {pyomp-0.3.2 → pyomp-0.4.0}/examples/ploop.1.py +0 -0
  89. {pyomp-0.3.2 → pyomp-0.4.0}/setup.cfg +0 -0
  90. {pyomp-0.3.2 → pyomp-0.4.0}/slides/PyOMP_SC24.pdf +0 -0
  91. {pyomp-0.3.2 → pyomp-0.4.0}/src/numba/openmp/libs/pass/DebugOpenMP.h +0 -0
  92. {pyomp-0.3.2 → pyomp-0.4.0}/src/pyomp.egg-info/dependency_links.txt +0 -0
  93. {pyomp-0.3.2 → pyomp-0.4.0}/src/pyomp.egg-info/top_level.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@v3
11
+ uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130
12
12
 
13
13
  - name: Set up Docker Buildx
14
- uses: docker/setup-buildx-action@v3
14
+ uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
15
15
 
16
16
  - name: Login to GitHub Container Registry
17
- uses: docker/login-action@v3
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@v6
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.9", "3.10", "3.11", "3.12"]
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@v4
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@v3
46
+ uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167
47
47
  with:
48
- python-version: "3.10"
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@v4
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@v5
35
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
33
36
 
34
37
  - name: Install cibuildwheel
35
38
  run: python -m pip install cibuildwheel==3.1.4
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: "15.0.7"
38
45
  run: python -m cibuildwheel --output-dir wheelhouse
39
46
 
40
- - uses: actions/upload-artifact@v4
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@v4
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: "15.0.7"
53
62
  run: pipx run build --sdist
54
63
 
55
- - uses: actions/upload-artifact@v4
64
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
56
65
  with:
57
66
  name: cibw-sdist
58
67
  path: dist/*.tar.gz
@@ -64,31 +73,18 @@ jobs:
64
73
  strategy:
65
74
  matrix:
66
75
  os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
67
- python-version: ['3.9', '3.10', '3.11', '3.12']
68
- numba-version: ['0.57.0', '0.57.1', '0.58.0', '0.58.1', '0.59.0', '0.59.1', '0.60.0']
69
- exclude:
70
- # Known incompatibilities based on numba's official support
71
- # Numba 0.57 supports Python 3.8-3.11
72
- - python-version: '3.12'
73
- numba-version: '0.57.0'
74
- - python-version: '3.12'
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'
76
+ python-version: ['3.10', '3.11', '3.12', '3.13']
77
+ numba-version: ['0.61.0', '0.61.2']
82
78
  steps:
83
79
  - name: Download built wheels
84
- uses: actions/download-artifact@v5
80
+ uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
85
81
  with:
86
82
  pattern: cibw-*
87
83
  path: dist
88
84
  merge-multiple: true
89
85
 
90
86
  - name: Setup Python
91
- uses: actions/setup-python@v5
87
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
92
88
  with:
93
89
  python-version: ${{ matrix.python-version }}
94
90
 
@@ -117,14 +113,14 @@ jobs:
117
113
  permissions:
118
114
  id-token: write
119
115
  steps:
120
- - uses: actions/download-artifact@v5
116
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
121
117
  with:
122
118
  pattern: cibw-*
123
119
  path: dist
124
120
  merge-multiple: true
125
121
 
126
122
  - name: Publish testpypi
127
- uses: pypa/gh-action-pypi-publish@release/v1
123
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
128
124
  with:
129
125
  repository-url: https://test.pypi.org/legacy/
130
126
  verbose: true
@@ -138,13 +134,13 @@ jobs:
138
134
  permissions:
139
135
  id-token: write
140
136
  steps:
141
- - uses: actions/download-artifact@v5
137
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
142
138
  with:
143
139
  pattern: cibw-*
144
140
  path: dist
145
141
  merge-multiple: true
146
142
 
147
143
  - name: Publish pypi
148
- uses: pypa/gh-action-pypi-publish@release/v1
144
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
149
145
  with:
150
146
  verbose: true
@@ -3,6 +3,7 @@
3
3
  docs/build*
4
4
  *.egg-info
5
5
  .vscode
6
+ .cache
6
7
  __pycache__
7
8
  *.a
8
9
  *.so
@@ -52,10 +52,10 @@ variables:
52
52
  parallel:
53
53
  matrix:
54
54
  - PYOMP_CI_PYTHON_VERSION:
55
- - "3.9"
56
55
  - "3.10"
57
56
  - "3.11"
58
57
  - "3.12"
58
+ - "3.13"
59
59
 
60
60
  build-and-test-tioga:
61
61
  extends: [.base-job, .python-variants]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyomp
3
- Version: 0.3.2
3
+ Version: 0.4.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.13,>=3.8
14
+ Requires-Python: <3.14,>=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.61,>=0.57
18
+ Requires-Dist: numba<0.62,>=0.61
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 0.57.x, 0.58.x, 0.59.x, 0.60.x on the
40
- following architecture and operating system combinations: linux-64 (x86_64),
41
- osx-arm64 (mac), linux-arm64, and linux-ppc64le.
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 planned for.
49
+ Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support in development.
47
50
 
48
51
  ## Installation
49
52
 
@@ -61,6 +64,13 @@ 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.4.x | 0.61.x |
72
+ | 0.3.x | 0.57.x - 0.60.x |
73
+
64
74
  Besides a standard installation, we also provide the following options to
65
75
  quickly try out PyOMP online or through a container.
66
76
 
@@ -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 0.57.x, 0.58.x, 0.59.x, 0.60.x on the
17
- following architecture and operating system combinations: linux-64 (x86_64),
18
- osx-arm64 (mac), linux-arm64, and linux-ppc64le.
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 planned for.
26
+ Also, PyOMP currently supports only NVIDIA GPUs with AMD GPU support in development.
24
27
 
25
28
  ## Installation
26
29
 
@@ -38,6 +41,13 @@ 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.4.x | 0.61.x |
49
+ | 0.3.x | 0.57.x - 0.60.x |
50
+
41
51
  Besides a standard installation, we also provide the following options to
42
52
  quickly try out PyOMP online or through a container.
43
53
 
@@ -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 llvmdev environment and install llvmdev 14.0.6.
21
- echo "Installing manylinux llvmdev 14.0.6..."
22
- conda create -n llvmdev -c conda-forge -y llvmdev=14.0.6
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 clangdev ${LLVM_VERSION}
27
+ echo "Installing manylinux llvmdev ${LLVM_VERSION}..."
28
+ conda create -n llvmdev-${LLVM_VERSION} -c conda-forge -q -y clang=${LLVM_VERSION} clang-tools=${LLVM_VERSION} llvmdev=${LLVM_VERSION}
@@ -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]
@@ -1,4 +1,5 @@
1
1
  {% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0').lstrip('v') %}
2
+ {% set LLVM_VERSION = environ.get('LLVM_VERSION', '15.0.7') %}
2
3
 
3
4
  package:
4
5
  name: pyomp
@@ -12,6 +13,8 @@ build:
12
13
  script_env:
13
14
  - PY_VCRUNTIME_REDIST # [win]
14
15
  script:
16
+ - export LLVM_VERSION={{ LLVM_VERSION }}
17
+ - export LLVM_DIR=${PREFIX}
15
18
  - export VERBOSE=1
16
19
  - export CPPFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -isystem ${PREFIX}/include -D_FORTIFY_SOURCE=2" # [osx]
17
20
  - rm -rf build dist src/*.egg-info
@@ -21,6 +24,9 @@ requirements:
21
24
  build:
22
25
  - {{ compiler('c') }}
23
26
  - {{ compiler('cxx') }}
27
+ # Add sysroot to ensure compatibility on linux builds.
28
+ - sysroot_linux-64 # [linux64]
29
+ - sysroot_linux-aarch64 # [aarch64]
24
30
  - cmake
25
31
  - setuptools_scm
26
32
  - elfutils # [linux]
@@ -28,18 +34,22 @@ requirements:
28
34
  host:
29
35
  - python
30
36
  - pip
37
+ # Add sysroot to ensure compatibility on linux builds.
38
+ - sysroot_linux-64 # [linux64]
39
+ - sysroot_linux-aarch64 # [aarch64]
31
40
  - setuptools
32
41
  - setuptools_scm
33
- - numba >=0.57, <0.61
34
- - clang 14.*
35
- - llvmdev 14.*
42
+ - numba >=0.61, <0.62
43
+ - clang {{ LLVM_VERSION }}
44
+ - clang-tools {{ LLVM_VERSION }}
45
+ - llvmdev {{ LLVM_VERSION }}
36
46
  - zlib
37
47
  - elfutils # [linux]
38
48
  - libffi # [linux]
39
49
  run:
40
50
  - python
41
51
  - setuptools
42
- - numba >=0.57, <0.61
52
+ - numba >=0.61, <0.62
43
53
  - lark
44
54
  - cffi
45
55
 
@@ -47,31 +57,31 @@ test:
47
57
  commands:
48
58
  - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomp.dylib # [osx]
49
59
  - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomp.so # [linux]
50
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx1010.bc # [linux]
51
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx1030.bc # [linux]
52
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx1031.bc # [linux]
53
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx700.bc # [linux]
54
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx701.bc # [linux]
55
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx801.bc # [linux]
56
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx803.bc # [linux]
57
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx900.bc # [linux]
58
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx902.bc # [linux]
59
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx906.bc # [linux]
60
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx908.bc # [linux]
61
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-amdgpu-gfx90a.bc # [linux]
62
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_35.bc # [linux]
63
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_37.bc # [linux]
64
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_50.bc # [linux]
65
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_52.bc # [linux]
66
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_53.bc # [linux]
67
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_60.bc # [linux]
68
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_61.bc # [linux]
69
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_62.bc # [linux]
70
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_70.bc # [linux]
71
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_72.bc # [linux]
72
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_75.bc # [linux]
73
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_80.bc # [linux]
74
- - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-new-nvptx-sm_86.bc # [linux]
60
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx1010.bc # [linux]
61
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx1030.bc # [linux]
62
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx1031.bc # [linux]
63
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx700.bc # [linux]
64
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx701.bc # [linux]
65
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx801.bc # [linux]
66
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx803.bc # [linux]
67
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx900.bc # [linux]
68
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx902.bc # [linux]
69
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx906.bc # [linux]
70
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx908.bc # [linux]
71
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-amdgpu-gfx90a.bc # [linux]
72
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_35.bc # [linux]
73
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_37.bc # [linux]
74
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_50.bc # [linux]
75
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_52.bc # [linux]
76
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_53.bc # [linux]
77
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_60.bc # [linux]
78
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_61.bc # [linux]
79
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_62.bc # [linux]
80
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_70.bc # [linux]
81
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_72.bc # [linux]
82
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_75.bc # [linux]
83
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_80.bc # [linux]
84
+ - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget-nvptx-sm_86.bc # [linux]
75
85
  - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget.rtl.amdgpu.so # [linux]
76
86
  - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget.rtl.cuda.so # [linux]
77
87
  - test -f $SP_DIR/numba/openmp/libs/libomp/lib/libomptarget.rtl.ppc64.so # [linux and ppc64le]
@@ -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 nvidia-smi --list-gpus; then
58
- echo "=> Found NVIDIA GPU, Run OpenMP offloading tests on GPU (device 0)"
59
- echo "=> Running: TEST_DEVICES=0 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget"
60
- OMP_TARGET_OFFLOAD=mandatory TEST_DEVICES=0 RUN_TARGET=1 $SEGVCATCH python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget 2>&1
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
@@ -7,15 +7,18 @@ TMPDIR=/tmp/pyomp/${CI_JOB_ID}
7
7
  mkdir -p ${TMPDIR}
8
8
  pushd ${TMPDIR}
9
9
 
10
+ # Set the LLVM_VERSION to use.
11
+ export LLVM_VERSION="15.0.7"
12
+
10
13
  # Set the envs directory under the temporary directory.
11
14
  export CONDA_ENVS_DIRS="${TMPDIR}/_stage/miniconda3/envs"
12
15
 
13
- # Install miniconda and llvmdev, clang14 environments.
16
+ # Install miniconda and llvmdev environment.
14
17
  source ${CI_PROJECT_DIR}/buildscripts/cibuildwheel/setup-miniconda3.sh
15
18
 
16
19
  # Export environment variables for building and testing.
17
- export LLVM_DIR="${CONDA_ENVS_DIRS}/llvmdev"
18
- export CLANG_TOOL="${CONDA_ENVS_DIRS}/clang14/bin/clang"
20
+ export LLVM_DIR="${CONDA_ENVS_DIRS}/llvmdev-${LLVM_VERSION}"
21
+ export PATH="${CONDA_ENVS_DIRS}/llvmdev-${LLVM_VERSION}/bin:${PATH}"
19
22
  export USE_CXX11_ABI="1"
20
23
  export PIP_NO_INPUT="1"
21
24
 
@@ -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(1)"):
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()
@@ -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.8, <3.13"
10
+ requires-python = ">=3.10, <3.14"
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.57, <0.61", "lark", "cffi", "setuptools"]
20
+ dependencies = ["numba>=0.61, <0.62", "lark", "cffi", "setuptools"]
21
21
  maintainers = [
22
22
  { name = "Giorgis Georgakoudis", email = "georgakoudis1@llnl.gov" },
23
23
  ]
@@ -46,6 +46,8 @@ 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
52
  before-all = ["bash buildscripts/cibuildwheel/setup-miniconda3.sh"]
51
53
  before-build = ["rm -rf build dist src/*.egg-info"]
@@ -64,7 +66,7 @@ before-all = [
64
66
  ]
65
67
 
66
68
  [tool.cibuildwheel.environment]
67
- LLVM_DIR = "_stage/miniconda3/envs/llvmdev"
68
- CLANG_TOOL = "_stage/miniconda3/envs/clang14/bin/clang"
69
+ LLVM_DIR = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}"
70
+ PATH = "${PWD}/_stage/miniconda3/envs/llvmdev-${LLVM_VERSION}/bin:${PATH}"
69
71
  USE_CXX11_ABI = "1"
70
72
  PIP_NO_INPUT = "1"