Skip to content

Commit 3dc6734

Browse files
Merge pull request #985 from lukaszstolarczuk/merge-v0.10.x-into-main
Merge v0.10.x into main
2 parents 625a9d4 + f160016 commit 3dc6734

File tree

16 files changed

+716
-36
lines changed

16 files changed

+716
-36
lines changed

.github/workflows/reusable_gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ jobs:
129129
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
130130
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
131131
with:
132-
name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-${{matrix.build_type}}-shared-${{matrix.shared_library}}
132+
name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
133133
path: ${{env.COVERAGE_DIR}}

.github/workflows/reusable_multi_numa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
--gtest_filter="-*checkModeLocal/*:*checkModePreferredEmptyNodeset/*:testNuma.checkModeInterleave"
7070
7171
- name: Check coverage
72-
if: matrix.os == 'ubuntu-22.04'
72+
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'ubuntu-22.04' }}
7373
working-directory: ${{env.BUILD_DIR}}
7474
run: |
7575
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}
@@ -79,7 +79,7 @@ jobs:
7979
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
8080
8181
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
82-
if: matrix.os == 'ubuntu-22.04'
82+
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'ubuntu-22.04' }}
8383
with:
84-
name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-${{matrix.build_type}}-shared-${{matrix.shared_library}}
84+
name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}
8585
path: ${{env.COVERAGE_DIR}}

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ else()
265265
./configure --prefix=${hwloc_targ_BINARY_DIR}
266266
--enable-static=yes --enable-shared=no --disable-libxml2
267267
--disable-pci --disable-levelzero --disable-opencl
268-
--disable-cuda --disable-nvml --disable-libudev CFLAGS=-fPIC
269-
CXXFLAGS=-fPIC
268+
--disable-cuda --disable-nvml --disable-libudev --disable-rsmi
269+
CFLAGS=-fPIC CXXFLAGS=-fPIC
270270
WORKING_DIRECTORY ${hwloc_targ_SOURCE_DIR}
271271
OUTPUT ${hwloc_targ_SOURCE_DIR}/Makefile
272272
DEPENDS ${hwloc_targ_SOURCE_DIR}/configure)

ChangeLog

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
Mon Dec 09 2024 Łukasz Stolarczuk <lukasz.stolarczuk@intel.com>
2+
3+
* Version 0.10.0
4+
5+
In this release we introduced updates in several areas, listed below.
6+
We still don't yet guarantee a fully stable API, though.
7+
With new parameters' API we broke the compatibility, as we no longer
8+
support direct access to UMF params via (now internal) structures.
9+
10+
Significant updates:
11+
- updated Level Zero Provider
12+
- new API to handle UMF parameters (replacing previous struct's)
13+
- extended IPC API testing
14+
- new Memtarget and Memspace API
15+
16+
Minor updates:
17+
- multiple fixes in the source code
18+
- extended code coverage reporting
19+
- improved CI and testing
20+
- new examples
21+
- extended logging
22+
- yet more fixes in the building system
23+
124
Tue Nov 12 2024 Łukasz Stolarczuk <lukasz.stolarczuk@intel.com>
225

326
* Version 0.9.1

examples/ipc_ipcapi/ipc_ipcapi_consumer.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ int main(int argc, char *argv[]) {
142142
goto err_destroy_OS_memory_provider;
143143
}
144144

145+
umf_ipc_handler_handle_t ipc_handler;
146+
umf_result = umfPoolGetIPCHandler(scalable_pool, &ipc_handler);
147+
if (umf_result != UMF_RESULT_SUCCESS) {
148+
fprintf(stderr, "[producer] ERROR: get IPC handler failed\n");
149+
goto err_destroy_scalable_pool;
150+
}
151+
145152
// connect to the producer
146153
producer_socket = consumer_connect_to_producer(port);
147154
if (producer_socket < 0) {
@@ -209,7 +216,7 @@ int main(int argc, char *argv[]) {
209216
len);
210217

211218
void *SHM_ptr;
212-
umf_result = umfOpenIPCHandle(scalable_pool, IPC_handle, &SHM_ptr);
219+
umf_result = umfOpenIPCHandle(ipc_handler, IPC_handle, &SHM_ptr);
213220
if (umf_result == UMF_RESULT_ERROR_NOT_SUPPORTED) {
214221
fprintf(stderr,
215222
"[consumer] SKIP: opening the IPC handle is not supported\n");

examples/ipc_level_zero/ipc_level_zero.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,21 @@ int main(void) {
180180

181181
fprintf(stdout, "Consumer pool created.\n");
182182

183+
umf_ipc_handler_handle_t ipc_handler = 0;
184+
umf_result = umfPoolGetIPCHandler(consumer_pool, &ipc_handler);
185+
if (umf_result != UMF_RESULT_SUCCESS) {
186+
fprintf(stderr, "ERROR: Failed to get IPC handler!\n");
187+
return -1;
188+
}
189+
183190
void *mapped_buf = NULL;
184-
umf_result = umfOpenIPCHandle(consumer_pool, ipc_handle, &mapped_buf);
191+
umf_result = umfOpenIPCHandle(ipc_handler, ipc_handle, &mapped_buf);
185192
if (umf_result != UMF_RESULT_SUCCESS) {
186193
fprintf(stderr, "ERROR: Failed to open IPC handle!\n");
187194
return -1;
188195
}
189196

190-
fprintf(stdout, "IPC handle opened in the consumer pool.\n");
197+
fprintf(stdout, "IPC handle opened.\n");
191198

192199
size_t *tmp_buf = malloc(BUFFER_SIZE);
193200
ret = level_zero_copy(consumer_context, device, tmp_buf, mapped_buf,

include/umf/ipc.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ extern "C" {
1919

2020
typedef struct umf_ipc_data_t *umf_ipc_handle_t;
2121

22+
typedef void *umf_ipc_handler_handle_t;
23+
2224
///
2325
/// @brief Returns the size of IPC handles for the specified pool.
2426
/// @param hPool [in] Pool handle
@@ -44,11 +46,11 @@ umf_result_t umfPutIPCHandle(umf_ipc_handle_t ipcHandle);
4446

4547
///
4648
/// @brief Open IPC handle retrieved by umfGetIPCHandle.
47-
/// @param hPool [in] Pool handle where to open the the IPC handle.
49+
/// @param hIPCHandler [in] IPC Handler handle used to open the IPC handle.
4850
/// @param ipcHandle [in] IPC handle.
4951
/// @param ptr [out] pointer to the memory in the current process.
5052
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
51-
umf_result_t umfOpenIPCHandle(umf_memory_pool_handle_t hPool,
53+
umf_result_t umfOpenIPCHandle(umf_ipc_handler_handle_t hIPCHandler,
5254
umf_ipc_handle_t ipcHandle, void **ptr);
5355

5456
///
@@ -57,6 +59,13 @@ umf_result_t umfOpenIPCHandle(umf_memory_pool_handle_t hPool,
5759
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
5860
umf_result_t umfCloseIPCHandle(void *ptr);
5961

62+
/// @brief Get handle to the IPC handler from existing pool.
63+
/// @param hPool [in] Pool handle
64+
/// @param hIPCHandler [out] handle to the IPC handler
65+
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
66+
umf_result_t umfPoolGetIPCHandler(umf_memory_pool_handle_t hPool,
67+
umf_ipc_handler_handle_t *hIPCHandler);
68+
6069
#ifdef __cplusplus
6170
}
6271
#endif

0 commit comments

Comments
 (0)