Skip to content

Commit 62576c8

Browse files
committed
Revert "Run Compatibility GPU CI jobs only on upstream"
This reverts commit 0d5a89c.
1 parent 998debe commit 62576c8

34 files changed

+333
-1814
lines changed

.cmake-format

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ with section("parse"):
2626
'kwargs': {
2727
'NAME': '*',
2828
'SRCS': '*',
29-
'LIBS': '*',
30-
'ENVS': '*'}},
29+
'LIBS': '*'}},
3130
'add_umf_library': {
3231
"pargs": 0,
3332
"flags": [],

.github/scripts/get_system_info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function check_L0_version {
1515
fi
1616

1717
if command -v zypper &> /dev/null; then
18-
zypper -n se level-zero || true
18+
zypper se level-zero && return
1919
fi
2020

2121
echo "level-zero not installed"

.github/workflows/reusable_benchmarks.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ jobs:
111111

112112
- name: Install benchmarking scripts deps
113113
run: |
114-
python -m venv .venv
115-
source .venv/bin/activate
116-
pip install -r ${{github.workspace}}/sycl-repo/unified-runtime/third_party/benchmark_requirements.txt
114+
pip install --force-reinstall -r ${{github.workspace}}/sycl-repo/unified-runtime/third_party/benchmark_requirements.txt
117115
118116
- name: Set core range and GPU mask
119117
run: |
@@ -137,7 +135,6 @@ jobs:
137135
id: benchmarks
138136
working-directory: ${{env.BUILD_DIR}}
139137
run: >
140-
source ${{github.workspace}}/.venv/bin/activate &&
141138
taskset -c ${{ env.CORES }} ${{ github.workspace }}/sycl-repo/unified-runtime/scripts/benchmarks/main.py
142139
~/bench_workdir_umf
143140
--umf ${{env.BUILD_DIR}}

.github/workflows/reusable_compatibility.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ jobs:
9494
9595
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
9696
working-directory: ${{github.workspace}}/tag_version/build
97-
# GTEST_FILTER is used below to skip test that is not compatible
9897
run: >
9998
UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
10099
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
101-
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
102100
ctest --verbose
103101
104102
windows:
@@ -183,14 +181,11 @@ jobs:
183181
working-directory: ${{github.workspace}}/tag_version/build
184182
run: |
185183
$env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
186-
$env:GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
187184
cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll
188185
ctest -C Debug --verbose
189186
190187
gpu:
191188
name: GPU Ubuntu
192-
# run only on upstream; forks will not have the HW
193-
if: github.repository == 'oneapi-src/unified-memory-framework'
194189
strategy:
195190
matrix:
196191
provider: ['LEVEL_ZERO', 'CUDA']
@@ -233,10 +228,8 @@ jobs:
233228
234229
- name: Run "tag" UMF tests
235230
working-directory: ${{github.workspace}}/tag_version/build
236-
run: >
237-
LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/
238-
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
239-
ctest --output-on-failure
231+
run: |
232+
LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
240233
241234
- name: Checkout latest UMF version
242235
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -271,5 +264,4 @@ jobs:
271264
run: >
272265
UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
273266
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
274-
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
275267
ctest --verbose -E "not_impl"

.github/workflows/reusable_multi_numa.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Runs tests on multi-numa machines
1+
# Runs tests on multi-numa machine
22
name: MultiNuma
33

44
on: [workflow_call]
@@ -20,7 +20,7 @@ jobs:
2020

2121
strategy:
2222
matrix:
23-
os: [ubuntu-22.04, rhel-9.1, sles-15]
23+
os: [ubuntu-22.04, rhel-9.1]
2424
build_type: [Debug, Release]
2525
shared_library: ['ON', 'OFF']
2626
runs-on: ["DSS-MULTI-NUMA", "DSS-${{matrix.os}}"]
@@ -31,6 +31,9 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34+
- name: Get information about platform
35+
run: .github/scripts/get_system_info.sh
36+
3437
- name: Configure build
3538
run: >
3639
cmake
@@ -50,24 +53,24 @@ jobs:
5053
run: cmake --build ${{github.workspace}}/build -j $(nproc)
5154

5255
- name: Run tests
53-
if: (matrix.os != 'rhel-9.1') && (matrix.os != 'sles-15')
56+
if: matrix.os != 'rhel-9.1'
5457
working-directory: ${{github.workspace}}/build
5558
run: ctest --output-on-failure --test-dir test
5659

57-
# On RHEL/SLES, hwloc version is just a little too low.
60+
# On RHEL, hwloc version is just a little too low.
5861
# Skip some tests until we upgrade hwloc and update CMake to properly handle local hwloc installation.
5962
# TODO: fix issue #560
6063
# TODO: add issue for -E test_init_teardown - it is not clear why it fails
61-
- name: Run tests (on RHEL/SLES)
62-
if: (matrix.os == 'rhel-9.1') || (matrix.os == 'sles-15')
64+
- name: Run tests (on RHEL)
65+
if: matrix.os == 'rhel-9.1'
6366
working-directory: ${{github.workspace}}/build
6467
run: |
6568
ctest --output-on-failure --test-dir test -E "test_provider_os_memory_multiple_numa_nodes|test_init_teardown"
6669
./test/test_provider_os_memory_multiple_numa_nodes \
6770
--gtest_filter="-*checkModeLocal/*:*checkModePreferredEmptyNodeset/*:testNuma.checkModeInterleave"
6871
6972
- name: Run NUMA tests under valgrind
70-
if: (matrix.os != 'rhel-9.1') && (matrix.os != 'sles-15')
73+
if: matrix.os != 'rhel-9.1'
7174
run: |
7275
${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{env.BUILD_DIR}} memcheck "${{env.NUMA_TESTS}}"
7376
${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{env.BUILD_DIR}} drd "${{env.NUMA_TESTS}}"
@@ -88,7 +91,3 @@ jobs:
8891
with:
8992
name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}
9093
path: ${{env.COVERAGE_DIR}}
91-
92-
- name: Get information about platform
93-
if: always()
94-
run: .github/scripts/get_system_info.sh

docs/config/api.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -168,26 +168,6 @@ IPC API allows retrieving IPC handles for the memory buffers allocated from
168168
UMF memory pools. The memory provider used by the pool should support IPC
169169
operations for this API to work. Otherwise IPC APIs return an error.
170170

171-
IPC caching
172-
------------------------------------------
173-
174-
UMF employs IPC caching to avoid multiple IPC handles being created for the same
175-
coarse-grain memory region allocated by the memory provider. UMF guarantees that
176-
for each coarse-grain memory region allocated by the memory provider, only one
177-
IPC handle is created when the :any:`umfGetIPCHandle` function is called. All
178-
subsequent calls to the :any:`umfGetIPCHandle` function for the pointer to the
179-
same memory region will return the entry from the cache.
180-
181-
The same is true for the :any:`umfOpenIPCHandle` function. The actual mapping
182-
of the IPC handle to the virtual address space is created only once, and all
183-
subsequent calls to open the same IPC handle will return the entry from the cache.
184-
The size of the cache for opened IPC handles is controlled by the ``UMF_MAX_OPENED_IPC_HANDLES``
185-
environment variable. By default, the cache size is unlimited. However, if the environment
186-
variable is set and the cache size exceeds the limit, old items will be evicted. UMF tracks
187-
the ref count for each entry in the cache and can evict only items with the ref count equal to 0.
188-
The ref count is increased when the :any:`umfOpenIPCHandle` function is called and decreased
189-
when the :any:`umfCloseIPCHandle` function is called for the corresponding IPC handle.
190-
191171
.. _ipc-api:
192172

193173
IPC API

include/umf/base.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ typedef enum umf_result_t {
4747
6, ///< Failure in user provider code (i.e in user provided callback)
4848
UMF_RESULT_ERROR_DEPENDENCY_UNAVAILABLE =
4949
7, ///< External required dependency is unavailable or missing
50-
UMF_RESULT_ERROR_OUT_OF_RESOURCES = 8, ///< Out of internal resources
51-
UMF_RESULT_ERROR_UNKNOWN = 0x7ffffffe ///< Unknown error
50+
UMF_RESULT_ERROR_UNKNOWN = 0x7ffffffe ///< Unknown or internal error
5251
} umf_result_t;
5352

5453
#ifdef __cplusplus

include/umf/pools/pool_disjoint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ umf_result_t umfDisjointPoolParamsSetSharedLimits(
100100

101101
/// @brief Set custom name of the disjoint pool to be used in the traces.
102102
/// @param hParams handle to the parameters of the disjoint pool.
103-
/// @param name custom name of the pool. Name longer than 64 characters will be truncated.
103+
/// @param name custom name of the pool.
104104
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
105105
umf_result_t
106106
umfDisjointPoolParamsSetName(umf_disjoint_pool_params_handle_t hParams,

src/critnib/critnib.c

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,7 @@ find_predecessor(struct critnib_node *__restrict n) {
525525
while (1) {
526526
int nib;
527527
for (nib = NIB; nib >= 0; nib--) {
528-
struct critnib_node *m;
529-
utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&m);
530-
if (m) {
528+
if (n->child[nib]) {
531529
break;
532530
}
533531
}
@@ -536,12 +534,7 @@ find_predecessor(struct critnib_node *__restrict n) {
536534
return NULL;
537535
}
538536

539-
utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&n);
540-
541-
if (!n) {
542-
return NULL;
543-
}
544-
537+
n = n->child[nib];
545538
if (is_leaf(n)) {
546539
return to_leaf(n);
547540
}
@@ -645,9 +638,7 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
645638
while (1) {
646639
unsigned nib;
647640
for (nib = 0; nib <= NIB; nib++) {
648-
struct critnib_node *m;
649-
utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&m);
650-
if (m) {
641+
if (n->child[nib]) {
651642
break;
652643
}
653644
}
@@ -656,12 +647,7 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
656647
return NULL;
657648
}
658649

659-
utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&n);
660-
661-
if (!n) {
662-
return NULL;
663-
}
664-
650+
n = n->child[nib];
665651
if (is_leaf(n)) {
666652
return to_leaf(n);
667653
}

src/ipc.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,19 @@ umf_result_t umfOpenIPCHandle(umf_ipc_handler_handle_t hIPCHandler,
146146
}
147147

148148
umf_result_t umfCloseIPCHandle(void *ptr) {
149-
umf_ipc_info_t ipcInfo;
150-
umf_result_t ret = umfMemoryTrackerGetIpcInfo(ptr, &ipcInfo);
149+
umf_alloc_info_t allocInfo;
150+
umf_result_t ret = umfMemoryTrackerGetAllocInfo(ptr, &allocInfo);
151151
if (ret != UMF_RESULT_SUCCESS) {
152-
LOG_ERR("cannot get IPC info for ptr = %p.", ptr);
152+
LOG_ERR("cannot get alloc info for ptr = %p.", ptr);
153153
return ret;
154154
}
155155

156-
return umfMemoryProviderCloseIPCHandle(ipcInfo.provider, ipcInfo.base,
157-
ipcInfo.baseSize);
156+
// We cannot use umfPoolGetMemoryProvider function because it returns
157+
// upstream provider but we need tracking one
158+
umf_memory_provider_handle_t hProvider = allocInfo.pool->provider;
159+
160+
return umfMemoryProviderCloseIPCHandle(hProvider, allocInfo.base,
161+
allocInfo.baseSize);
158162
}
159163

160164
umf_result_t umfPoolGetIPCHandler(umf_memory_pool_handle_t hPool,

0 commit comments

Comments
 (0)