File tree Expand file tree Collapse file tree 4 files changed +84
-3
lines changed Expand file tree Collapse file tree 4 files changed +84
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,13 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
28
28
umf_test_mocks PUBLIC ${UMF_CMAKE_SOURCE_DIR} /include ${UMF_SRC_DIR}
29
29
${UMF_UTILS_DIR} ${LEVEL_ZERO_INCLUDE_DIRS} )
30
30
31
- add_library (umf_ze_loopback SHARED ze_loopback.h ze_loopback.cpp)
31
+ add_umf_library(
32
+ NAME umf_ze_loopback
33
+ TYPE SHARED
34
+ SRCS ze_loopback.h ze_loopback.cpp
35
+ LINUX_MAP_FILE ${CMAKE_CURRENT_SOURCE_DIR} /ze_loopback.map
36
+ WINDOWS_DEF_FILE ${CMAKE_CURRENT_SOURCE_DIR} /ze_loopback.def)
37
+
32
38
target_include_directories (umf_ze_loopback
33
39
PUBLIC ${LEVEL_ZERO_INCLUDE_DIRS} )
34
40
endif ()
Original file line number Diff line number Diff line change @@ -101,8 +101,7 @@ void MockedLevelZeroTestEnvironment::SetUp() {
101
101
setenv (" UMF_ZE_LOADER_LIB_NAME" , lib_name, 1 );
102
102
#endif
103
103
104
- void *lib_handle =
105
- utils_open_library (lib_name, UMF_UTIL_OPEN_LIBRARY_NO_LOAD);
104
+ void *lib_handle = utils_open_library (lib_name, 0 );
106
105
ASSERT_NE (lib_handle, nullptr );
107
106
108
107
void *l0interface_sym =
Original file line number Diff line number Diff line change
1
+ ;;;; Begin Copyright Notice
2
+ ; Copyright (C) 2025 Intel Corporation
3
+ ; Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
4
+ ; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
+ ;;;; End Copyright Notice
6
+
7
+ LIBRARY UMF_ZE_LOOPBACK
8
+
9
+ EXPORTS
10
+ level_zero_mock
11
+ zeInit
12
+ zeDriverGet
13
+ zeDeviceGet
14
+ zeDeviceGetProperties
15
+ zeContextCreate
16
+ zeContextDestroy
17
+ zeCommandQueueCreate
18
+ zeCommandQueueDestroy
19
+ zeCommandQueueExecuteCommandLists
20
+ zeCommandQueueSynchronize
21
+ zeCommandListCreate
22
+ zeCommandListDestroy
23
+ zeCommandListClose
24
+ zeCommandListAppendMemoryCopy
25
+ zeCommandListAppendMemoryFill
26
+ zeContextMakeMemoryResident
27
+ zeMemGetAllocProperties
28
+ zeMemAllocDevice
29
+ zeMemAllocHost
30
+ zeMemAllocShared
31
+ zeMemFree
32
+ zeMemFreeExt
33
+ zeMemGetIpcHandle
34
+ zeMemPutIpcHandle
35
+ zeMemOpenIpcHandle
36
+ zeMemCloseIpcHandle
37
+ zeDeviceGetMemoryProperties
Original file line number Diff line number Diff line change
1
+ # Copyright (C) 2025 Intel Corporation
2
+ # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+
5
+ # These functions are meant to be in unnamed scope. They are also not named
6
+ # with any umf prefix, as they should override functions with the same name.
7
+ {
8
+ global:
9
+ level_zero_mock;
10
+ zeInit;
11
+ zeDriverGet;
12
+ zeDeviceGet;
13
+ zeDeviceGetProperties;
14
+ zeContextCreate;
15
+ zeContextDestroy;
16
+ zeCommandQueueCreate;
17
+ zeCommandQueueDestroy;
18
+ zeCommandQueueExecuteCommandLists;
19
+ zeCommandQueueSynchronize;
20
+ zeCommandListCreate;
21
+ zeCommandListDestroy;
22
+ zeCommandListClose;
23
+ zeCommandListAppendMemoryCopy;
24
+ zeCommandListAppendMemoryFill;
25
+ zeContextMakeMemoryResident;
26
+ zeMemGetAllocProperties;
27
+ zeMemAllocDevice;
28
+ zeMemAllocHost;
29
+ zeMemAllocShared;
30
+ zeMemFree;
31
+ zeMemFreeExt;
32
+ zeMemGetIpcHandle;
33
+ zeMemPutIpcHandle;
34
+ zeMemOpenIpcHandle;
35
+ zeMemCloseIpcHandle;
36
+ zeDeviceGetMemoryProperties;
37
+ local:
38
+ *;
39
+ };
You can’t perform that action at this time.
0 commit comments