You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The are also more advanced that allocates USM memory from the
21
+
The are also more advanced that allocates USM memory from the
22
22
[Level Zero device](https://github.com/oneapi-src/unified-memory-framework/blob/main/examples/level_zero_shared_memory/level_zero_shared_memory.c)
23
23
using the Level Zero API and UMF Level Zero memory provider and [CUDA device](https://github.com/oneapi-src/unified-memory-framework/blob/main/examples/cuda_shared_memory/cuda_shared_memory.c)
24
24
using the CUDA API and UMF CUDA memory provider.
@@ -28,19 +28,23 @@ using the CUDA API and UMF CUDA memory provider.
@@ -73,20 +77,22 @@ UMF also provides multithreaded benchmarks that can be enabled by setting both
73
77
`UMF_BUILD_BENCHMARKS` and `UMF_BUILD_BENCHMARKS_MT` CMake
74
78
configuration flags to `ON`. Multithreaded benchmarks require a C++ support.
75
79
76
-
The Scalable Pool requirements can be found in the relevant 'Memory Pool
80
+
The Scalable Pool requirements can be found in the relevant 'Memory Pool
77
81
managers' section below.
78
82
79
83
### Sanitizers
80
84
81
85
List of sanitizers available on Linux:
86
+
82
87
- AddressSanitizer
83
88
- UndefinedBehaviorSanitizer
84
89
- ThreadSanitizer
85
-
- Is mutually exclusive with other sanitizers.
90
+
- Is mutually exclusive with other sanitizers.
86
91
- MemorySanitizer
87
-
- Requires linking against MSan-instrumented libraries to prevent false positive reports. More information [here](https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo).
92
+
- Requires linking against MSan-instrumented libraries to prevent false positive reports. More information [here](https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo).
88
93
89
94
List of sanitizers available on Windows:
95
+
90
96
- AddressSanitizer
91
97
92
98
Listed sanitizers can be enabled with appropriate [CMake options](#cmake-standard-options).
@@ -133,7 +139,7 @@ UMF comes with predefined pool allocators (see [`include/umf/pools`](include/umf
133
139
providers that implement a specific interface (see [`include/umf/memory_pool_ops.h`](include/umf/memory_pool_ops.h)
134
140
and [`include/umf/memory_provider_ops.h`](include/umf/memory_provider_ops.h)).
135
141
136
-
More detailed documentation is available here: https://oneapi-src.github.io/unified-memory-framework/
142
+
More detailed documentation is available here: <https://oneapi-src.github.io/unified-memory-framework/>
137
143
138
144
### Memory providers
139
145
@@ -146,6 +152,7 @@ A memory provider that can provide memory from a given pre-allocated buffer.
146
152
A memory provider that provides memory from an operating system.
147
153
148
154
OS memory provider supports two types of memory mappings (set by the `visibility` parameter):
155
+
149
156
1) private memory mapping (`UMF_MEM_MAP_PRIVATE`)
150
157
2) shared memory mapping (`UMF_MEM_MAP_SHARED` - supported on Linux only yet)
151
158
@@ -159,16 +166,18 @@ Permission to duplicate another process's file descriptor is governed by a ptrac
159
166
the `/proc/sys/kernel/yama/ptrace_scope` interface in the following way:
@@ -266,7 +276,7 @@ To enable this feature, the `UMF_BUILD_LIBUMF_POOL_DISJOINT` option needs to be
266
276
267
277
#### Jemalloc pool
268
278
269
-
Jemalloc pool is a [jemalloc](https://github.com/jemalloc/jemalloc)-based memory
279
+
Jemalloc pool is a [jemalloc](https://github.com/jemalloc/jemalloc)-based memory
270
280
pool manager built as a separate static library: libjemalloc_pool.a on Linux and
271
281
jemalloc_pool.lib on Windows.
272
282
The `UMF_BUILD_LIBUMF_POOL_JEMALLOC` option has to be turned `ON` to build this library.
@@ -275,6 +285,7 @@ The `UMF_BUILD_LIBUMF_POOL_JEMALLOC` option has to be turned `ON` to build this
275
285
276
286
In case of Linux OS jemalloc is built from the (fetched) sources with the following
277
287
non-default options enabled:
288
+
278
289
-`--with-jemalloc-prefix=je_` - adds the `je_` prefix to all public APIs,
279
290
-`--disable-cxx` - disables C++ integration, it will cause the `new` and the `delete`
280
291
operators implementations to be omitted.
@@ -289,6 +300,7 @@ The default jemalloc package is required on Windows.
289
300
290
301
1) The `UMF_BUILD_LIBUMF_POOL_JEMALLOC` option turned `ON`
291
302
2) jemalloc is required:
303
+
292
304
- on Linux and MacOS: jemalloc is fetched and built from sources (a custom build),
293
305
- on Windows: the default jemalloc package is required
294
306
@@ -300,7 +312,8 @@ It is distributed as part of libumf. To use this pool, TBB must be installed in
300
312
##### Requirements
301
313
302
314
Packages required for using this pool and executing tests/benchmarks (not required for build):
303
-
- libtbb-dev (libtbbmalloc.so.2) on Linux or tbb (tbbmalloc.dll) on Windows
315
+
316
+
- libtbb-dev (libtbbmalloc.so.2) on Linux or tbb (tbbmalloc.dll) on Windows
304
317
305
318
### Memspaces (Linux-only)
306
319
@@ -338,10 +351,11 @@ To enable this feature, the `UMF_BUILD_SHARED_LIBRARY` option needs to be turned
338
351
In case of Linux it can be done without any code changes using the `LD_PRELOAD` environment variable:
339
352
340
353
```sh
341
-
$ LD_PRELOAD=/usr/lib/libumf_proxy.so myprogram
354
+
LD_PRELOAD=/usr/lib/libumf_proxy.so myprogram
342
355
```
343
356
344
357
The memory used by the proxy memory allocator is mmap'ed:
358
+
345
359
1) with the `MAP_PRIVATE` flag by default or
346
360
2) with the `MAP_SHARED` flag if the `UMF_PROXY` environment variable contains one of two following strings: `page.disposition=shared-shm` or `page.disposition=shared-fd`. These two options differ in a mechanism used during IPC:
347
361
-`page.disposition=shared-shm` - IPC uses the named shared memory. An SHM name is generated using the `umf_proxy_lib_shm_pid_$PID` pattern, where `$PID` is the PID of the process. It creates the `/dev/shm/umf_proxy_lib_shm_pid_$PID` file.
@@ -357,6 +371,7 @@ It can be enabled by adding the `size.threshold=<value>` string to the `UMF_PROX
357
371
#### Windows
358
372
359
373
In case of Windows it requires:
374
+
360
375
1) explicitly linking your program dynamically with the `umf_proxy.dll` library
361
376
2) (C++ code only) including `proxy_lib_new_delete.h` in a single(!) source file in your project
362
377
to override also the `new`/`delete` operations.
@@ -370,3 +385,7 @@ an issue or a Pull Request, please read [Contribution Guide](./CONTRIBUTING.md).
370
385
371
386
To enable logging in UMF source files please follow the guide in the
0 commit comments