@@ -32,8 +32,10 @@ https://github.com/intel/llvm/issues
32
32
33
33
== Contributors
34
34
35
+ Jessica Davies, Intel +
35
36
Joe Garvey, Intel +
36
- Abhishek Tiwari, Intel
37
+ Abhishek Tiwari, Intel +
38
+ Bowen Xue, Intel
37
39
38
40
== Dependencies
39
41
@@ -54,8 +56,14 @@ rely on APIs defined in this specification.*
54
56
== Overview
55
57
56
58
This extension introduces kernel properties to specify how or when control and
57
- data signals can be passed into or out of an FPGA kernel. These properties are
58
- meaningless on non-FPGA devices and can be ignored on such devices.
59
+ data signals can be passed into or out of an FPGA kernel.
60
+
61
+ On FPGA targets, regions of the circuit called clusters may be statically
62
+ scheduled. This extension also introduces kernel properties that specify how
63
+ statically-scheduled clusters should be implemented for an FPGA target.
64
+
65
+ These properties are meaningless on non-FPGA devices and can be ignored on such
66
+ devices.
59
67
60
68
== Specification
61
69
@@ -91,18 +99,18 @@ enum class streaming_interface_options_enum {
91
99
remove_downstream_stall
92
100
};
93
101
94
- enum class register_map_interface_options_enum {
95
- wait_for_done_write,
96
- do_not_wait_for_done_write
97
- };
98
-
99
102
struct streaming_interface_key {
100
103
template <streaming_interface_options_enum option>
101
104
using value_t = sycl::ext::oneapi::properties::property_value<
102
105
streaming_interface_key,
103
106
std::integral_constant<streaming_interface_options_enum, option>>;
104
107
};
105
108
109
+ enum class register_map_interface_options_enum {
110
+ wait_for_done_write,
111
+ do_not_wait_for_done_write
112
+ };
113
+
106
114
struct register_map_interface_key {
107
115
template <register_map_interface_options_enum option>
108
116
using value_t = sycl::ext::oneapi::properties::property_value<
@@ -117,25 +125,33 @@ struct pipelined_key {
117
125
std::integral_constant<size_t, pipeline_directive_or_initiation_interval>>;
118
126
};
119
127
128
+ enum class fpga_cluster_options_enum : /* unspecified */ {
129
+ stall_enable,
130
+ stall_free
131
+ };
132
+
133
+ struct fpga_cluster_key {
134
+ template <fpga_cluster_options_enum option>
135
+ using value_t = sycl::ext::oneapi::properties::property_value<
136
+ fpga_cluster_key,
137
+ std::integral_constant<fpga_cluster_options_enum, option>>;
138
+ };
139
+
120
140
template <streaming_interface_options_enum option>
121
141
inline constexpr streaming_interface_key::value_t<option> streaming_interface;
122
-
123
142
inline constexpr streaming_interface_key::value_t<
124
143
streaming_interface_options_enum::accept_downstream_stall>
125
144
streaming_interface_accept_downstream_stall;
126
-
127
145
inline constexpr streaming_interface_key::value_t<
128
146
streaming_interface_options_enum::remove_downstream_stall>
129
147
streaming_interface_remove_downstream_stall;
130
148
131
149
template <register_map_interface_options_enum option>
132
150
inline constexpr register_map_interface_key::value_t<option>
133
151
register_map_interface;
134
-
135
152
inline constexpr register_map_interface_key::value_t<
136
153
register_map_interface_options_enum::wait_for_done_write>
137
154
register_map_interface_wait_for_done_write;
138
-
139
155
inline constexpr register_map_interface_key::value_t<
140
156
register_map_interface_options_enum::do_not_wait_for_done_write>
141
157
register_map_interface_do_not_wait_for_done_write;
@@ -144,6 +160,17 @@ template<int pipeline_directive_or_initiation_interval>
144
160
inline constexpr pipelined_key::value_t<
145
161
pipeline_directive_or_initiation_interval> pipelined;
146
162
163
+ template<fpga_cluster_options_enum option>
164
+ inline constexpr fpga_cluster_key::value_t<option> fpga_cluster;
165
+ inline constexpr fpga_cluster_key::value_t<
166
+ fpga_cluster_options_enum::stall_enable_clusters> stall_enable_clusters;
167
+ inline constexpr fpga_cluster_key::value_t<
168
+ fpga_cluster_options_enum::stall_free_clusters> stall_free_clusters;
169
+
170
+ template <> struct is_property_key<streaming_interface_key> : std::true_type {};
171
+ template <> struct is_property_key<register_map_interface_key> : std::true_type {};
172
+ template <> struct is_property_key<fpga_cluster_key> : std::true_type {};
173
+
147
174
} // namespace sycl::ext::intel::experimental
148
175
```
149
176
@@ -218,6 +245,27 @@ inline constexpr pipelined_key::value_t<
218
245
219
246
If the property parameter (N) is not specified, the default value is `-1`.
220
247
Valid values for `N` are values greater than or equal to `-1`.
248
+
249
+ |`fpga_cluster`
250
+ |The `fpga_cluster` property is a request for the
251
+ compiler to implement statically-scheduled clusters using the specified
252
+ clustering method for all clusters in the annotated kernel, when possible. The
253
+ following values are supported:
254
+
255
+ * `stall_enable`: Directs the compiler to prefer generating an enable signal to
256
+ freeze the cluster when the cluster is stalled whenever possible.
257
+
258
+ * `stall_free`: Directs the compiler to prefer using an exit FIFO to hold
259
+ output data from clusters when the cluster is stalled whenever possible.
260
+
261
+ *Note*: Some clusters cannot be implemented with some cluster types so the
262
+ request isn't guaranteed to be followed.
263
+
264
+ The following properties have been provided for convenience:
265
+ `stall_enable_clusters`,
266
+ `stall_free_clusters`.
267
+
268
+ =======
221
269
|===
222
270
223
271
Device compilers that do not support this extension may accept and ignore these
@@ -298,4 +346,5 @@ q.single_task(KernelFunctor{a, b, c}).wait();
298
346
|Rev|Date|Author|Changes
299
347
|1|2022-03-01|Abhishek Tiwari|*Initial public working draft*
300
348
|2|2022-12-05|Abhishek Tiwari|*Make pipelined property parameter a signed int*
301
- |========================================
349
+ |3|2024-01-05|Bowen Xue|*Add fpga_cluster property*
350
+ |========================================
0 commit comments