Skip to content

Commit 7b56dfe

Browse files
committed
[SYCL][Doc] Remove graph property for buffer host lifetime
Addressed Greg's most recent feedback points: * [Don't need the assume_data_outlives_buffer](intel#10473 (comment)) * [Move graph_support_level namespace](intel#10473 (comment))
1 parent a755938 commit 7b56dfe

File tree

1 file changed

+14
-34
lines changed

1 file changed

+14
-34
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ enum class queue_state {
307307
recording
308308
};
309309
310+
enum class graph_support_level {
311+
unsupported,
312+
native,
313+
emulated
314+
};
315+
310316
namespace property {
311317
312318
namespace graph {
@@ -320,12 +326,6 @@ class assume_buffer_outlives_graph {
320326
public:
321327
assume_buffer_outlives_graph() = default;
322328
};
323-
324-
class assume_data_outlives_buffer {
325-
public:
326-
assume_data_outlives_buffer() = default;
327-
};
328-
329329
} // namespace graph
330330
331331
namespace node {
@@ -346,12 +346,6 @@ namespace device {
346346
struct graphs_support;
347347
348348
} // namespace device
349-
350-
enum class graph_support_level {
351-
unsupported,
352-
native,
353-
emulated
354-
};
355349
} // namespace info
356350
357351
class node {};
@@ -426,17 +420,17 @@ public:
426420
=== Device Info Query
427421

428422
Due to the experimental nature of the extension, support is not available across
429-
all devices. The following device support query is added to report devices which
423+
all devices. The following device support query is added to the
424+
`sycl::ext::oneapi::experimental` namespace for reporting devices which are
430425
are currently supported, and how that support is implemented.
431426

432-
433427
Table {counter: tableNumber}. Device Info Queries.
434428
[%header]
435429
|===
436430
| Device Descriptors | Return Type | Description
437431

438432
|`info::device::graph_support`
439-
|`info::graph_support_level`
433+
|`graph_support_level`
440434
|When passed to `device::get_info<...>()`, the function returns `native`
441435
if there is an underlying SYCL backend command-buffer construct which is used
442436
to propagate the graph to the backend. If no backend construct exists, or
@@ -551,17 +545,6 @@ which is used in a graph will be kept alive on the host for the lifetime of the
551545
graph. Destroying that buffer during the lifetime of a `command_graph`
552546
constructed with this property results in undefined behavior.
553547

554-
===== Assume-Data-Outlives-Buffer Property [[assume-data-outlives-buffer-property]]
555-
556-
The `property::graph::assume_data_outlives_buffer` property disables
557-
<<buffer-limitations, restrictions on using buffers>> which have been created
558-
with a host pointer in a `command_graph`, and can be passed to a `command_graph`
559-
on construction via the property list parameter. This property represents a
560-
promise from the user that any host data passed to a buffer's constructor will
561-
outlive the buffer itself, and by extension any graph in which that buffer is
562-
used. Deleting or otherwise modifying this host data during the lifetime of the
563-
buffer or graph results in undefined behavior when using this property.
564-
565548
==== Graph Member Functions
566549

567550
Table {counter: tableNumber}. Constructor of the `command_graph` class.
@@ -679,9 +662,10 @@ Exceptions:
679662
* Throws synchronously with error code `invalid` if a queue is recording
680663
commands to the graph.
681664

682-
* Throws synchronously with error code `invalid` if this command uses a buffer
683-
which was created with a host data pointer. See the
684-
<<assume-data-outlives-buffer-property, Assume-Data-Outlives-Buffer>>
665+
* Throws synchronously with error code `invalid` if the graph wasn't created with
666+
the `property::graph::assume_buffer_outlives_graph` property and this command
667+
uses a buffer. See the
668+
<<assume-buffer-outlives-graph-property, Assume-Buffer-Outlives-Graph>>
685669
property for more information.
686670

687671
|
@@ -1115,9 +1099,6 @@ host data pointer in commands recorded to a `command_graph`. Because of the
11151099
delayed execution of a `command_graph`, data may not be copied to the device
11161100
immediately when commands using these buffers are submitted to the graph,
11171101
therefore the host data must also outlive the graph to ensure correct behavior.
1118-
Users can pass the <<assume-data-outlives-buffer-property, Assume-Data-Outlives-Buffer>>
1119-
property to the graph constructor to provide a promise that this will not occur
1120-
and that it is safe to use this buffer in the graph.
11211102

11221103
Because of the delayed execution of a recorded graph, it is not possible to support
11231104
captured code which relies on the copy-back on destruction behavior of buffers.
@@ -1391,8 +1372,7 @@ submitted in its entirety for execution via
13911372
{
13921373
// New object representing graph of command-groups
13931374
sycl_ext::command_graph graph(q.get_context(), q.get_device(),
1394-
{sycl_ext::property::graph::assume_buffer_outlives_graph{},
1395-
sycl_ext::property::graph::assume_data_outlives_buffer{}});
1375+
{sycl_ext::property::graph::assume_buffer_outlives_graph{}});
13961376
13971377
13981378
// `q` will be put in the recording state where commands are recorded to

0 commit comments

Comments
 (0)