You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sycl/doc/extensions/DataFlowPipes/data_flow_pipes_rev4_proposed.asciidoc
+88Lines changed: 88 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -634,6 +634,92 @@ Automated mechanisms are possible to provide uniquification across calls, and co
634
634
*RESOLUTION*: Resolved. Abstraction/libraries on top enable functionality like this. We will make public a library that enables arrays of pipes.
635
635
--
636
636
637
+
== Experimental APIs
638
+
639
+
*NOTE*: The APIs described in this section are experimental. Future versions of this extension may change these APIs in ways that are incompatible with the versions described here.
640
+
641
+
In the experimental API version, read/write methods take template arguments, which can contain the latency control properties `latency_anchor_id` and/or `latency_constraint`.
642
+
643
+
* `sycl::ext::intel::experimental::latency_anchor_id<N>`, where `N` is an integer: An ID to associate with the current read/write function call, which can then be referenced by other `latency_constraint` properties elsewhere in the program to define relative latency constaints. ID must be unique within the application, and a diagnostic is required if that condition is not met.
644
+
* `sycl::ext::intel::experimental::latency_constraint<A, B, C>`: A tuple of three values which cause the current read/write function call to act as an endpoint of a latency constraint relative to a specified `latency_anchor_id` defined by a different instruction.
645
+
** `A` is an integer: The ID of the target anchor defined on a different instruction through a `latency_anchor_id` property.
646
+
** `B` is an enum value: The type of control from the set {`type::exact`, `type::max`, `type::min`}.
647
+
** `C` is an integer: The relative clock cycle difference between the target anchor and the current function call, that the constraint should infer subject to the type of the control (exact, max, min).
648
+
649
+
The template arguments above don't have to be specified if user doesn't want to apply latency controls. The template arguments can be passed in arbitrary order.
650
+
651
+
=== Implementation
652
+
653
+
[source,c++]
654
+
----
655
+
// Added in version 2 of this extension.
656
+
namespace sycl::ext::intel::experimental {
657
+
enum class type {
658
+
none, // default
659
+
exact,
660
+
max,
661
+
min
662
+
};
663
+
664
+
template <int32_t _N> struct latency_anchor_id {
665
+
static constexpr int32_t value = _N;
666
+
static constexpr int32_t default_value = -1;
667
+
};
668
+
669
+
template <int32_t _N1, type _N2, int32_t _N3> struct latency_constraint {
670
+
static constexpr std::tuple<int32_t, type, int32_t> value = {_N1, _N2, _N3};
0 commit comments