Skip to content

Commit e83ee34

Browse files
Minor cleanups and additions in docs
includes: - add missing CUDA provider in the web docs, - proxy_pool is enabled by default, move req. info to proxy_lib, - add links in README.
1 parent 1a5155f commit e83ee34

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,16 @@ List of options provided by CMake:
122122

123123
## Architecture: memory pools and providers
124124

125-
A UMF memory pool is a combination of a pool allocator and a memory provider. A memory provider is responsible for coarse-grained memory allocations and management of memory pages, while the pool allocator controls memory pooling and handles fine-grained memory allocations.
125+
A UMF memory pool is a combination of a pool allocator and a memory provider. A memory provider is responsible for
126+
coarse-grained memory allocations and management of memory pages, while the pool allocator controls memory pooling
127+
and handles fine-grained memory allocations.
126128

127129
Pool allocator can leverage existing allocators (e.g. jemalloc or tbbmalloc) or be written from scratch.
128130

129-
UMF comes with predefined pool allocators (see include/pool) and providers (see include/provider). UMF can also work with user-defined pools and providers that implement a specific interface (see include/umf/memory_pool_ops.h and include/umf/memory_provider_ops.h).
131+
UMF comes with predefined pool allocators (see [`include/umf/pools`](include/umf/pools)) and providers
132+
(see [`include/umf/providers`](include/umf/providers)). UMF can also work with user-defined pools and
133+
providers that implement a specific interface (see [`include/umf/memory_pool_ops.h`](include/umf/memory_pool_ops.h)
134+
and [`include/umf/memory_provider_ops.h`](include/umf/memory_provider_ops.h)).
130135

131136
More detailed documentation is available here: https://oneapi-src.github.io/unified-memory-framework/
132137

@@ -152,6 +157,7 @@ a duplicate of another process's file descriptor (`pidfd_getfd(2)` is supported
152157
Permission to duplicate another process's file descriptor is governed by a ptrace access mode
153158
`PTRACE_MODE_ATTACH_REALCREDS` check (see `ptrace(2)`) that can be changed using
154159
the `/proc/sys/kernel/yama/ptrace_scope` interface in the following way:
160+
155161
```sh
156162
$ sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
157163
```
@@ -183,6 +189,7 @@ a duplicate of another process's file descriptor (`pidfd_getfd(2)` is supported
183189
Permission to duplicate another process's file descriptor is governed by a ptrace access mode
184190
`PTRACE_MODE_ATTACH_REALCREDS` check (see `ptrace(2)`) that can be changed using
185191
the `/proc/sys/kernel/yama/ptrace_scope` interface in the following way:
192+
186193
```sh
187194
$ sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
188195
```
@@ -203,7 +210,7 @@ Additionally, required for tests:
203210

204211
#### DevDax memory provider (Linux only)
205212

206-
A memory provider that provides memory from a device DAX (a character device file /dev/daxX.Y).
213+
A memory provider that provides memory from a device DAX (a character device file like `/dev/daxX.Y`).
207214
It can be used when large memory mappings are needed.
208215

209216
##### Requirements
@@ -249,8 +256,6 @@ This memory pool is distributed as part of libumf. It forwards all requests to t
249256
memory provider. Currently umfPoolRealloc, umfPoolCalloc and umfPoolMallocUsableSize functions
250257
are not supported by the proxy pool.
251258

252-
To enable this feature, the `UMF_BUILD_SHARED_LIBRARY` option needs to be turned `ON`.
253-
254259
#### Disjoint pool
255260

256261
TODO: Add a description
@@ -326,6 +331,8 @@ Querying the latency value requires HMAT support on the platform. Calling `umfMe
326331
UMF provides the UMF proxy library (`umf_proxy`) that makes it possible
327332
to override the default allocator in other programs in both Linux and Windows.
328333

334+
To enable this feature, the `UMF_BUILD_SHARED_LIBRARY` option needs to be turned `ON`.
335+
329336
#### Linux
330337

331338
In case of Linux it can be done without any code changes using the `LD_PRELOAD` environment variable:

scripts/docs_config/api.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ supported by the Proxy Pool.
5858

5959
Scalable Pool
6060
------------------------------------------
61+
62+
A oneTBB-based memory pool manager.
63+
6164
.. doxygenfile:: pool_scalable.h
6265
:sections: define enum typedef func var
6366

@@ -104,10 +107,18 @@ A memory provider that provides memory from L0 device.
104107
.. doxygenfile:: provider_level_zero.h
105108
:sections: define enum typedef func var
106109

110+
CUDA Provider
111+
------------------------------------------
112+
113+
A memory provider that provides memory from CUDA device.
114+
115+
.. doxygenfile:: provider_cuda.h
116+
:sections: define enum typedef func var
117+
107118
DevDax Memory Provider
108119
------------------------------------------
109120

110-
A memory provider that provides memory from a device DAX (a character device file /dev/daxX.Y).
121+
A memory provider that provides memory from a device DAX (a character device file like /dev/daxX.Y).
111122

112123
.. doxygenfile:: provider_devdax_memory.h
113124
:sections: define enum typedef func var

0 commit comments

Comments
 (0)