Skip to content

Commit ecf040c

Browse files
committed
Merge branch 'test_L0_win' of https://github.com/szadam/unified-memory-framework into test_L0_win
2 parents 34dbd09 + 95131ed commit ecf040c

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

.github/workflows/gpu.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
compiler: [{c: gcc, cxx: g++}]
2424
- os: 'Windows'
2525
compiler: [{c: cl, cxx: cl}]
26-
extra_arg: "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Administrator/repo/vpckg/scripts/buildsystems/vpckg.cmake"
26+
extra_arg: "-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/build/vcpkg/scripts/buildsystems/vpckg.cmake"
2727

2828
runs-on: ["DSS-LEVEL_ZERO", "DSS-${{matrix.os}}"]
2929

@@ -35,6 +35,20 @@ jobs:
3535
if: matrix.os == 'Ubuntu'
3636
run: .github/scripts/get_system_info.sh
3737

38+
- name: Initialize vcpkg
39+
if: matrix.os == 'Windows'
40+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
41+
with:
42+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
43+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
44+
vcpkgJsonGlob: '**/vcpkg.json'
45+
46+
- name: Install dependencies
47+
if: matrix.os == 'Windows'
48+
run: |
49+
vcpkg install
50+
vpckg integrate install
51+
3852
- name: Configure build
3953
run: >
4054
cmake

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,17 @@ if(UMF_BUILD_EXAMPLES)
254254
add_subdirectory(examples)
255255
endif()
256256

257+
# Conditional configuration for Level Zero provider
258+
if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
259+
set(OPTIONAL_SYMBOLS "umfLevelZeroMemoryProviderOps")
260+
else()
261+
set(OPTIONAL_SYMBOLS "")
262+
endif()
263+
264+
# Configure the DEF file based on whether Level Zero provider is built
265+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libumf.def"
266+
"${CMAKE_CURRENT_BINARY_DIR}/src/libumf.def" @ONLY)
267+
257268
if(UMF_FORMAT_CODE_STYLE)
258269
find_program(CLANG_FORMAT NAMES clang-format-15 clang-format-15.0
259270
clang-format)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ A memory provider that provides memory from an operating system.
136136
Required packages for tests (Linux-only yet):
137137
- libnuma-dev
138138

139-
#### Level Zero memory provider (Linux-only yet)
139+
#### Level Zero memory provider
140140

141141
A memory provider that provides memory from L0 device.
142142

@@ -147,11 +147,10 @@ A memory provider that provides memory from L0 device.
147147

148148
Additionally, required for tests:
149149

150-
3) Linux OS
151-
4) The `UMF_BUILD_GPU_TESTS` option turned `ON`
152-
5) System with Level Zero compatible GPU
153-
6) Required packages:
154-
- liblevel-zero-dev
150+
3) The `UMF_BUILD_GPU_TESTS` option turned `ON`
151+
4) System with Level Zero compatible GPU
152+
5) Required packages:
153+
- liblevel-zero-dev (Linux) or level-zero-sdk (Windows)
155154

156155
### Memory pool managers
157156

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if(UMF_BUILD_SHARED_LIBRARY)
106106
SRCS ${UMF_SOURCES}
107107
LIBS ${UMF_LIBS}
108108
LINUX_MAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libumf.map
109-
WINDOWS_DEF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libumf.def)
109+
WINDOWS_DEF_FILE ${CMAKE_CURRENT_BINARY_DIR}/libumf.def)
110110
set(UMF_PRIVATE_COMPILE_DEFINITIONS ${UMF_PRIVATE_COMPILE_DEFINITIONS}
111111
"UMF_SHARED_LIBRARY")
112112
set_target_properties(umf PROPERTIES RUNTIME_OUTPUT_DIRECTORY

src/libumf.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ EXPORTS
1414
umfFree
1515
umfGetIPCHandle
1616
umfGetLastFailedMemoryProvider
17-
umfLevelZeroMemoryProviderOps
1817
umfMemoryProviderAlloc
1918
umfMemoryProviderAllocationMerge
2019
umfMemoryProviderAllocationSplit
@@ -50,3 +49,4 @@ EXPORTS
5049
umfProxyPoolOps
5150
umfPutIPCHandle
5251
umfOsMemoryProviderOps
52+
@OPTIONAL_SYMBOLS@

0 commit comments

Comments
 (0)