Skip to content

Commit d94e8a7

Browse files
committed
Change formatting based on suggestions
Signed-off-by: James Brodman <[email protected]>
1 parent fb32287 commit d94e8a7

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,29 @@ the application should not attempt further direct use of those handles.
141141

142142
## 5 Level-Zero additional functionality
143143

144-
### 5.1 Free Memory query
145-
Level Zero contains a library for system resource management called Sysman.
146-
Sysman allows programmers to query the amount of free, or unallocated,
147-
memory in a device. This extension provides a new device information
148-
descriptor specific to Level-Zero Backends that allows DPC++ programs to query
149-
the amount of free memory for a given device. The new descriptor is as follows:
144+
### 5.1 Device Information Descriptors
145+
The Level Zero backend provides the following device information descriptors
146+
that an application can use to query information about a Level Zero device.
147+
Applications use these queries via the `device::get_backend_info<>()` member
148+
function as shown in the example below (which illustrates the `free_memory`
149+
query):
150+
151+
``` C++
152+
sycl::queue Queue;
153+
auto Device = Queue.get_device();
154+
155+
size_t freeMemory =
156+
Device.get_backend_info<sycl::ext::oneapi::level_zero::info::device::free_memory>();
157+
```
158+
159+
New descriptors added as part of this specification are found in the table below:
160+
161+
| Descriptor | Description |
162+
| ---------- | ----------- |
163+
| `sycl::ext::oneapi::level_zero::info::device::free_memory` | Returns the number of bytes of free memory for the device. |
164+
165+
166+
#### 5.1.1 Free Memory Query Details
150167

151168
``` C++
152169
namespace sycl{
@@ -168,15 +185,6 @@ struct free_memory {
168185
} // namespace sycl
169186
```
170187
171-
The new struct ```free_memory``` is used in conjuction with the ```get_backend_info()``` method of the ```device``` class in SYCL 2020. The query will return the number of bytes of free memory for that device.
172-
173-
``` C++
174-
sycl::queue Queue;
175-
auto Device = Queue.get_device();
176-
177-
uint64_t freeMemory = Device.get_backend_info<sycl::ext::oneapi::info::device::free_memory>();
178-
```
179-
180188
## Revision History
181189
|Rev|Date|Author|Changes|
182190
|-------------|:------------|:------------|:------------|

0 commit comments

Comments
 (0)