Skip to content

Commit e076b22

Browse files
Release 0.1.2 (#13)
- Update numbawithopenmp to 296fb858b0a6800323e9b46b027c32636ecc80c7 - Support slicing for target mappings - Support code caching for CPU, GPU regions - Fix OpenMP CUDA RTL bug #10 - Fix README Closes #10
1 parent 9348edf commit e076b22

File tree

5 files changed

+56
-4
lines changed

5 files changed

+56
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PyOMP is distributed as a package through Conda, currently supporting linux-64
2727
(x86_64), osx-arm64 (mac), linux-arm64, and linux-ppc64le architectures.
2828

2929
```bash
30-
conda install -c python-for-hpc -c conda-forge --override-channels pyomp
30+
conda install -c python-for-hpc -c conda-forge pyomp
3131
```
3232

3333
## Trying it out
@@ -56,7 +56,7 @@ docker run -it ghcr.io/python-for-hpc/pyomp:latest /bin/bash
5656

5757
To use Jupyter, run without arguments and forward port 8888.
5858
```
59-
podman run -it -p 8888:8888 ghcr.io/python-for-hpc/pyomp:latest
59+
docker run -it -p 8888:8888 ghcr.io/python-for-hpc/pyomp:latest
6060
```
6161
Jupyter will start as a service on localhost with token authentication by default.
6262
Grep the url with the token from the output and copy it to the browser.

buildscripts/conda-recipes/llvm-openmp-dev/meta.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ package:
55
source:
66
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/openmp-14.0.6.src.tar.xz
77
sha256: 4f731ff202add030d9d68d4c6daabd91d3aeed9812e6a5b4968815cfdff0eb1f
8+
patches:
9+
- patches/0001-BACKPORT-Fix-for-CUDA-OpenMP-RTL.patch
810

911
build:
1012
merge_build_host: False
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 4e2d04de758d0ae37a1fd663c3c139293bfb3dc4 Mon Sep 17 00:00:00 2001
2+
From: Giorgis Georgakoudis <[email protected]>
3+
Date: Tue, 28 Nov 2023 01:16:15 -0800
4+
Subject: [PATCH] [BACKPORT] Fix for CUDA OpenMP RTL
5+
# Based on LLVM commit 545fcc3d842c0912db61591520bd4f760686c5a3
6+
7+
---
8+
openmp-14.0.6.src/libomptarget/plugins/cuda/src/rtl.cpp | 6 +++++-
9+
1 file changed, 5 insertions(+), 1 deletion(-)
10+
11+
diff --git a/openmp-14.0.6.src/libomptarget/plugins/cuda/src/rtl.cpp b/openmp-14.0.6.src/libomptarget/plugins/cuda/src/rtl.cpp
12+
index 0ca05f0ec3a0..16da3f434bba 100644
13+
--- a/openmp-14.0.6.src/libomptarget/plugins/cuda/src/rtl.cpp
14+
+++ b/openmp-14.0.6.src/libomptarget/plugins/cuda/src/rtl.cpp
15+
@@ -234,6 +234,7 @@ template <typename T> class ResourcePoolTy {
16+
std::mutex Mutex;
17+
/// Pool of resources.
18+
std::vector<T> Resources;
19+
+ std::vector<T> Pool;
20+
/// A reference to the corresponding allocator.
21+
AllocatorTy<T> Allocator;
22+
23+
@@ -243,11 +244,13 @@ template <typename T> class ResourcePoolTy {
24+
auto CurSize = Resources.size();
25+
assert(Size > CurSize && "Unexpected smaller size");
26+
Resources.reserve(Size);
27+
+ Pool.reserve(Size);
28+
for (auto I = CurSize; I < Size; ++I) {
29+
T NewItem;
30+
int Ret = Allocator.create(NewItem);
31+
if (Ret != OFFLOAD_SUCCESS)
32+
return false;
33+
+ Pool.push_back(NewItem);
34+
Resources.push_back(NewItem);
35+
}
36+
return true;
37+
@@ -308,8 +311,9 @@ public:
38+
/// Released all stored resources and clear the pool.
39+
/// Note: This function is not thread safe. Be sure to guard it if necessary.
40+
void clear() noexcept {
41+
- for (auto &R : Resources)
42+
+ for (auto &R : Pool)
43+
(void)Allocator.destroy(R);
44+
+ Pool.clear();
45+
Resources.clear();
46+
}
47+
};
48+
--
49+
2.29.1
50+

buildscripts/conda-recipes/numba/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package:
77

88
source:
99
git_url: https://github.com/Python-for-HPC/numbaWithOpenmp.git
10-
git_rev: e86d15701de24f66b1da3fd9015208d25ea26d81
10+
git_rev: 296fb858b0a6800323e9b46b027c32636ecc80c7
1111
git_depth: 1
1212

1313
build:

buildscripts/conda-recipes/pyomp/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: pyomp
3-
version: 0.1.1
3+
version: 0.1.2
44

55
build:
66
string: {{ (GITHUB_HEAD_SHA | default(''))[:7] ~ (CI_COMMIT_SHA | default(''))[:7] }}

0 commit comments

Comments
 (0)