Skip to content

Commit 7f841d9

Browse files
committed
[SYCL][Doc] Add launch props to enqueue functions
Some of the submission functions in sycl_ext_oneapi_enqueue_functions allowed launch properties to be specified, but not all of them. Add overloads to the remaining functions, so that launch properties can be passed to them all.
1 parent 753ab35 commit 7f841d9

File tree

1 file changed

+231
-5
lines changed

1 file changed

+231
-5
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc

Lines changed: 231 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,26 @@ a!
301301
----
302302
namespace sycl::ext::oneapi::experimental {
303303
304+
template <typename KernelName, typename KernelType, typename Properties>
305+
void single_task(sycl::queue q, Properties properties, const KernelType& k);
306+
307+
template <typename KernelName, typename KernelType, typename Properties>
308+
void single_task(sycl::handler &h, Properties properties, const KernelType& k);
309+
310+
}
311+
----
312+
!====
313+
_Effects_: Enqueues a kernel function to the `sycl::queue` or `sycl::handler`
314+
as a single task, using the kernel launch properties specified by `properties`.
315+
316+
a|
317+
[frame=all,grid=none]
318+
!====
319+
a!
320+
[source,c++]
321+
----
322+
namespace sycl::ext::oneapi::experimental {
323+
304324
template <typename Args...>
305325
void single_task(sycl::queue q, const sycl::kernel& k, Args&&... args);
306326
@@ -314,6 +334,29 @@ _Effects_: Enqueues a kernel object to the `sycl::queue` or `sycl::handler` as
314334
a single task. The arguments in `args` are passed to the kernel in the same
315335
order.
316336

337+
a|
338+
[frame=all,grid=none]
339+
!====
340+
a!
341+
[source,c++]
342+
----
343+
namespace sycl::ext::oneapi::experimental {
344+
345+
template <typename Properties, typename Args...>
346+
void single_task(sycl::queue q, Properties properties, const sycl::kernel& k,
347+
Args&&... args);
348+
349+
template <typename Properties, typename Args...>
350+
void single_task(sycl::handler &h, Properties properties, const sycl::kernel& k,
351+
Args&&... args);
352+
353+
}
354+
----
355+
!====
356+
_Effects_: Enqueues a kernel object to the `sycl::queue` or `sycl::handler` as
357+
a single task, using the kernel launch properties specified by `properties`. The
358+
arguments in `args` are passed to the kernel in the same order.
359+
317360
|====
318361

319362

@@ -574,6 +617,28 @@ a!
574617
----
575618
namespace sycl::ext::oneapi::experimental {
576619
620+
template <typename Properties>
621+
void memcpy(sycl::queue q, Properties properties, void* dest, const void* src,
622+
size_t numBytes);
623+
624+
template <typename Properties>
625+
void memcpy(sycl::handler &h, Properties properties, void* dest, const void* src,
626+
size_t numBytes);
627+
628+
}
629+
----
630+
!====
631+
_Effects_: Enqueues a `memcpy` to the `sycl::queue` or `sycl::handler` using the
632+
launch properties specified by `properties`.
633+
634+
a|
635+
[frame=all,grid=none]
636+
!====
637+
a!
638+
[source,c++]
639+
----
640+
namespace sycl::ext::oneapi::experimental {
641+
577642
template <typename T>
578643
void copy(sycl::queue q, const T* src, T* dest, size_t count);
579644
@@ -593,6 +658,28 @@ a!
593658
----
594659
namespace sycl::ext::oneapi::experimental {
595660
661+
template <typename T, typename Properties>
662+
void copy(sycl::queue q, Properties properties, const T* src, T* dest,
663+
size_t count);
664+
665+
template <typename T, typename Properties>
666+
void copy(sycl::handler &h, Properties properties, const T* src, T* dest,
667+
size_t count);
668+
669+
}
670+
----
671+
!====
672+
_Effects_: Enqueues a `copy` to the `sycl::queue` or `sycl::handler` using the
673+
launch properties specified by `properties`.
674+
675+
a|
676+
[frame=all,grid=none]
677+
!====
678+
a!
679+
[source,c++]
680+
----
681+
namespace sycl::ext::oneapi::experimental {
682+
596683
void memset(sycl::queue q, void* ptr, int value, size_t numBytes);
597684
598685
void memset(sycl::handler &h, void* ptr, int value, size_t numBytes);
@@ -610,6 +697,28 @@ a!
610697
----
611698
namespace sycl::ext::oneapi::experimental {
612699
700+
template <typename Properties>
701+
void memset(sycl::queue q, Properties properties, void* ptr, int value,
702+
size_t numBytes);
703+
704+
template <typename Properties>
705+
void memset(sycl::handler &h, Properties properties, void* ptr, int value,9
706+
size_t numBytes);
707+
708+
}
709+
----
710+
!====
711+
_Effects_: Enqueues a `memset` to the `sycl::queue` or `sycl::handler` using the
712+
launch properties specified by `properties`.
713+
714+
a|
715+
[frame=all,grid=none]
716+
!====
717+
a!
718+
[source,c++]
719+
----
720+
namespace sycl::ext::oneapi::experimental {
721+
613722
template <typename T>
614723
void fill(sycl::queue q, T* ptr, const T& pattern, size_t count);
615724
@@ -629,6 +738,28 @@ a!
629738
----
630739
namespace sycl::ext::oneapi::experimental {
631740
741+
template <typename T, typename Properties>
742+
void fill(sycl::queue q, Properties properties, T* ptr, const T& pattern,
743+
size_t count);
744+
745+
template <typename T, typename Properties>
746+
void fill(sycl::handler &h, Properties properties, T* ptr, const T& pattern,
747+
size_t count);
748+
749+
}
750+
----
751+
!====
752+
_Effects_: Enqueues a `fill` to the `sycl::queue` or `sycl::handler` using the
753+
launch properties specified by `properties`.
754+
755+
a|
756+
[frame=all,grid=none]
757+
!====
758+
a!
759+
[source,c++]
760+
----
761+
namespace sycl::ext::oneapi::experimental {
762+
632763
void prefetch(sycl::queue q, void* ptr, size_t numBytes);
633764
634765
void prefetch(sycl::handler &h, void* ptr, size_t numBytes);
@@ -646,6 +777,26 @@ a!
646777
----
647778
namespace sycl::ext::oneapi::experimental {
648779
780+
template <typename Properties>
781+
void prefetch(sycl::queue q, Properties properties, void* ptr, size_t numBytes);
782+
783+
template <typename Properties>
784+
void prefetch(sycl::handler &h, Properties properties, void* ptr, size_t numBytes);
785+
786+
}
787+
----
788+
!====
789+
_Effects_: Enqueues a `prefetch` to the `sycl::queue` or `sycl::handler` using
790+
the launch properties specified by `properties`.
791+
792+
a|
793+
[frame=all,grid=none]
794+
!====
795+
a!
796+
[source,c++]
797+
----
798+
namespace sycl::ext::oneapi::experimental {
799+
649800
void mem_advise(sycl::queue q, void* ptr, size_t numBytes, int advice);
650801
651802
void mem_advise(sycl::handler &h, void* ptr, size_t numBytes, int advice);
@@ -655,6 +806,28 @@ void mem_advise(sycl::handler &h, void* ptr, size_t numBytes, int advice);
655806
!====
656807
_Effects_: Enqueues a `mem_advise` to the `sycl::queue` or `sycl::handler`.
657808

809+
a|
810+
[frame=all,grid=none]
811+
!====
812+
a!
813+
[source,c++]
814+
----
815+
namespace sycl::ext::oneapi::experimental {
816+
817+
template <typename Properties>
818+
void mem_advise(sycl::queue q, Properties properties, void* ptr, size_t numBytes,
819+
int advice);
820+
821+
template <typename Properties>
822+
void mem_advise(sycl::handler &h, Properties properties, void* ptr, size_t numBytes,
823+
int advice);
824+
825+
}
826+
----
827+
!====
828+
_Effects_: Enqueues a `mem_advise` to the `sycl::queue` or `sycl::handler` using
829+
the launch properties specified by `properties`.
830+
658831
|====
659832

660833

@@ -673,16 +846,19 @@ a!
673846
----
674847
namespace sycl::ext::oneapi::experimental {
675848
676-
void barrier(sycl::queue q);
849+
template <typename Properties = empty_properties_t>
850+
void barrier(sycl::queue q, Properties properties = {});
677851
678-
void barrier(sycl::handler &h);
852+
template <typename Properties = empty_properties_t>
853+
void barrier(sycl::handler &h, Properties properties = {});
679854
680855
}
681856
----
682857
!====
683-
_Effects_: Enqueues a command barrier to the `sycl::queue` or `sycl::handler`.
858+
_Effects_: Enqueues a command barrier to the `sycl::queue` or `sycl::handler`
859+
using the properties specified by `properties`.
684860
Any commands submitted after this barrier cannot begin execution until all
685-
previously submitted commands (and any commands associated with dependendent
861+
previously submitted commands (and any commands associated with dependent
686862
events) have completed.
687863

688864
a|
@@ -710,6 +886,31 @@ associated with other dependent events) have completed.
710886
commands unless the `queue` is in-order. Implementations may be able to
711887
optimize such partial barriers.
712888
_{endnote}_]
889+
890+
a|
891+
[frame=all,grid=none]
892+
!====
893+
a!
894+
[source,c++]
895+
----
896+
namespace sycl::ext::oneapi::experimental {
897+
898+
template <typename Properties>
899+
void partial_barrier(sycl::queue q, Properties properties,
900+
const std::vector<sycl::event>& events);
901+
902+
template <typename Properties>
903+
void partial_barrier(sycl::handler &h, Properties properties,
904+
const std::vector<sycl::event>& events);
905+
906+
}
907+
----
908+
!====
909+
_Effects_: Enqueues a _partial_ command barrier to the `sycl::queue` or
910+
`sycl::handler` using the properties specified by `properties`. Any commands
911+
submitted after this barrier cannot begin execution until all commands
912+
associated with `events` (and any commands associated with other dependent
913+
events) have completed.
713914
|====
714915

715916
==== Command Graph
@@ -734,11 +935,36 @@ void execute_graph(sycl::handler &h, command_graph<graph_state::executable> &g);
734935
}
735936
----
736937
!====
737-
_Constraints_: Device and context associated with queue need to be identical
938+
_Preconditions_: Device and context associated with queue need to be identical
738939
to device and context provided at command graph creation.
739940

740941
_Effects_: Submits an executable command graph to the `sycl::queue` or `sycl::handler`.
741942

943+
a|
944+
[frame=all,grid=none]
945+
!====
946+
a!
947+
[source,c++]
948+
----
949+
namespace sycl::ext::oneapi::experimental {
950+
951+
template <typename Properties>
952+
void execute_graph(sycl::queue q, Properties properties,
953+
command_graph<graph_state::executable> &g);
954+
955+
template <typename Properties>
956+
void execute_graph(sycl::handler &h, Properties properties,
957+
command_graph<graph_state::executable> &g);
958+
959+
}
960+
----
961+
!====
962+
_Preconditions_: Device and context associated with queue need to be identical
963+
to device and context provided at command graph creation.
964+
965+
_Effects_: Submits an executable command graph to the `sycl::queue` or
966+
`sycl::handler` using the launch properties specified by `properties`.
967+
742968
|====
743969

744970
== Issues

0 commit comments

Comments
 (0)