@@ -307,6 +307,12 @@ enum class queue_state {
307
307
recording
308
308
};
309
309
310
+ enum class graph_support_level {
311
+ unsupported,
312
+ native,
313
+ emulated
314
+ };
315
+
310
316
namespace property {
311
317
312
318
namespace graph {
@@ -320,12 +326,6 @@ class assume_buffer_outlives_graph {
320
326
public:
321
327
assume_buffer_outlives_graph() = default;
322
328
};
323
-
324
- class assume_data_outlives_buffer {
325
- public:
326
- assume_data_outlives_buffer() = default;
327
- };
328
-
329
329
} // namespace graph
330
330
331
331
namespace node {
@@ -346,12 +346,6 @@ namespace device {
346
346
struct graphs_support;
347
347
348
348
} // namespace device
349
-
350
- enum class graph_support_level {
351
- unsupported,
352
- native,
353
- emulated
354
- };
355
349
} // namespace info
356
350
357
351
class node {};
@@ -426,17 +420,17 @@ public:
426
420
=== Device Info Query
427
421
428
422
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
430
425
are currently supported, and how that support is implemented.
431
426
432
-
433
427
Table {counter: tableNumber}. Device Info Queries.
434
428
[%header]
435
429
|===
436
430
| Device Descriptors | Return Type | Description
437
431
438
432
|`info::device::graph_support`
439
- |`info:: graph_support_level`
433
+ |`graph_support_level`
440
434
|When passed to `device::get_info<...>()`, the function returns `native`
441
435
if there is an underlying SYCL backend command-buffer construct which is used
442
436
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
551
545
graph. Destroying that buffer during the lifetime of a `command_graph`
552
546
constructed with this property results in undefined behavior.
553
547
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
-
565
548
==== Graph Member Functions
566
549
567
550
Table {counter: tableNumber}. Constructor of the `command_graph` class.
@@ -679,9 +662,10 @@ Exceptions:
679
662
* Throws synchronously with error code `invalid` if a queue is recording
680
663
commands to the graph.
681
664
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>>
685
669
property for more information.
686
670
687
671
|
@@ -1115,9 +1099,6 @@ host data pointer in commands recorded to a `command_graph`. Because of the
1115
1099
delayed execution of a `command_graph`, data may not be copied to the device
1116
1100
immediately when commands using these buffers are submitted to the graph,
1117
1101
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.
1121
1102
1122
1103
Because of the delayed execution of a recorded graph, it is not possible to support
1123
1104
captured code which relies on the copy-back on destruction behavior of buffers.
@@ -1391,8 +1372,7 @@ submitted in its entirety for execution via
1391
1372
{
1392
1373
// New object representing graph of command-groups
1393
1374
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{}});
1396
1376
1397
1377
1398
1378
// `q` will be put in the recording state where commands are recorded to
0 commit comments