From e41ecbb2e7505885fbdd02860ab6fbeb08ebee12 Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Wed, 11 Jan 2023 15:44:13 +0000 Subject: [PATCH] Add property_list parameter to finalize. Introduces an optional `property_list` parameter when creating an executable graph with finalize. No properties are defined that could be passed here, but the kernel fusion API `fusion_wrapper::complete fusion()` takes a property list, which could be relevant in future. Additionally, CUDA has a `cudaGraphInstantiateWithParams()` entry-point that this property list would provide equivalent coverage for. Using a `property_list` in this way is analagous to how [kernel_bundle](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:interfaces.bundles.overview.synopsis) `compile()`/`link()`/`build()` take a property list and return a new object with different state. --- .../extensions/proposed/sycl_ext_oneapi_graph.asciidoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc b/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc index 07057217ba058..27dbd9f1fe81d 100644 --- a/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc +++ b/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc @@ -325,7 +325,9 @@ template<> class command_graph { public: command_graph(const property_list& propList = {}); - command_graph finalize(const context& syclContext) const; + + command_graph + finalize(const context& syclContext, const property_list& propList = {}) const; bool begin_recording(queue recordingQueue); bool begin_recording(const std::vector& recordingQueues); @@ -594,7 +596,8 @@ Exceptions: [source,c++] ---- using namespace ext::oneapi::experimental; -command_graph finalize(const context& syclContext) const; +command_graph +finalize(const context& syclContext, const property_list& propList = {}) const; ---- |Synchronous operation that creates a new graph in the executable state with a @@ -614,6 +617,9 @@ Parameters: * `syclContext` - The context associated with the queues to which the executable graph will be able to be submitted. +* `propList` - Optional parameter for passing properties. No finalization + properties are defined by this extension. + Returns: A new executable graph object which can be submitted to a queue. Exceptions: