Skip to content

[SYCL][DOC] Add Extension for FPGA task_sequence #6348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 63 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
148e767
Create sycl_ext_intel_fpga_task_sequence.asciidoc
rho180 Jun 23, 2022
1b34187
Merge pull request #1 from rho180/task_sequence
rho180 Jun 23, 2022
9eff282
Apply suggestions from code review
rho180 Jul 4, 2022
bc0b184
Update sycl_ext_intel_fpga_task_sequence.asciidoc
rho180 Jul 4, 2022
c99d4dd
Update sycl_ext_intel_fpga_task_sequence.asciidoc
rho180 Jul 5, 2022
9e3ded7
Update sycl_ext_intel_fpga_task_sequence.asciidoc
rho180 Jul 5, 2022
3207da3
Merge branch 'intel:sycl' into sycl
rho180 Dec 5, 2022
3ed1006
update format, limit line length
tiwaria1 Jan 25, 2023
61e9fc0
address minor review comments
tiwaria1 Jan 25, 2023
3413ad5
add example, addres review comments
tiwaria1 Feb 3, 2023
601aa0e
move examples to after overview section
tiwaria1 Feb 3, 2023
a3df56d
correct kernel props link
tiwaria1 Feb 3, 2023
92f4bb1
update wording about parallel invocations
tiwaria1 Feb 5, 2023
693d627
Apply wording updates from code review
tiwaria1 Feb 5, 2023
17aa4a5
remove impl details, update revision history text
tiwaria1 Feb 7, 2023
7545e26
make property description user centric
tiwaria1 Feb 7, 2023
6de6787
update backend support note
tiwaria1 Feb 7, 2023
e6394b7
mention enqueue_kernel API
tiwaria1 Feb 7, 2023
501f60f
simplify code example, use USM
tiwaria1 Feb 7, 2023
2d8f8b7
simplify code example, remove function body
tiwaria1 Feb 7, 2023
ad315b2
reword why we have the partial specialization
tiwaria1 Feb 7, 2023
0d5201d
remove the unnecessary UB description
tiwaria1 Feb 7, 2023
65e9c23
uupdate nvocation capacity property description
tiwaria1 Feb 7, 2023
708aad2
add sycl_ext_oneapi_kernel_properties as a dependency
tiwaria1 Feb 8, 2023
5d2151a
add feature test macro
tiwaria1 Feb 24, 2023
08f341c
make fn call wording uniform, update property description
tiwaria1 Mar 6, 2023
191a042
corrections to prop descriptions, add to progress guarantees section
tiwaria1 Mar 7, 2023
2c2dc6e
remove fifo wording, mention when get blocks, trim trailing whitespace
tiwaria1 Mar 7, 2023
fda0d08
explain progress guarantee delegation, fix formatting
tiwaria1 Mar 8, 2023
1fc4c71
update overview wroding
tiwaria1 Mar 10, 2023
2d148a9
fix link to pipelined property, update dependencies list
tiwaria1 Mar 10, 2023
abae766
sync sycl_ext_intel_fpga_kernel_interface_properties.asciidoc to latest
tiwaria1 Mar 10, 2023
6588b95
add SEC property to kernel properties spec
tiwaria1 Mar 10, 2023
194d651
reference the SEC property in the task-seq spec
tiwaria1 Mar 10, 2023
a59f3a3
simplify example
tiwaria1 Mar 12, 2023
58764cf
clarify dependenies section
tiwaria1 Mar 12, 2023
b92e9ae
add compile time error for general class template
tiwaria1 Mar 12, 2023
4973bdb
Apply suggestions from code review
tiwaria1 Mar 12, 2023
e5f1071
remove unnecessary impl details, new line correction
tiwaria1 Mar 12, 2023
5f04344
keep partial spec in properties header sample
tiwaria1 Mar 12, 2023
f892108
Merge branch 'sycl' into sycl
tiwaria1 Mar 12, 2023
0f422d0
add aspect info; address formatting comments
tiwaria1 Mar 22, 2023
66d6e13
add stall-free property; rename use_stall* to stall*
tiwaria1 Mar 22, 2023
afe5a76
update authors section; expand overview to introduce new properties
tiwaria1 Mar 23, 2023
778f284
Merge branch 'intel:sycl' into sycl
rho180 Apr 6, 2023
ec9146b
use established forward progress model and memory semantics as discus…
bowenxue-intel Sep 26, 2023
b4a8e00
minor revision
bowenxue-intel Sep 28, 2023
e9f82d1
reword properties, remove partial specialization text
bowenxue-intel Oct 10, 2023
d284fb1
define some task sequence concepts
bowenxue-intel Nov 1, 2023
c5599e0
address review comments
bowenxue-intel Nov 8, 2023
10a6337
remove partial specialization, describe async, get, and destructor in…
bowenxue-intel Dec 6, 2023
3872c84
Address review comments
bowenxue-intel Jan 5, 2024
e3b1cbf
address review comments
bowenxue-intel Jan 9, 2024
8701d83
Update sycl/doc/extensions/experimental/sycl_ext_intel_fpga_task_sequ…
bowenxue-intel Jan 31, 2024
0eb07e7
minor revisions
bowenxue-intel Mar 8, 2024
914d6b8
reword memory order semantics section
bowenxue-intel Mar 11, 2024
2d68065
Merge branch 'intel:sycl' into sycl
rho180 Apr 2, 2024
1964b6f
Update sycl/doc/extensions/experimental/sycl_ext_intel_fpga_task_sequ…
aejjehint Jun 20, 2024
d9d82a9
Update sycl/doc/extensions/experimental/sycl_ext_intel_fpga_task_sequ…
aejjehint Jun 20, 2024
eda09a3
handling some of Joe's comments
aejjehint Jun 20, 2024
8075162
moving extension to proposed
aejjehint Jun 20, 2024
25e1d21
Remove inheritance
aejjehint Jun 25, 2024
abd7689
Remove UB
aejjehint Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ https://github.com/intel/llvm/issues

== Contributors

Jessica Davies, Intel +
Joe Garvey, Intel +
Abhishek Tiwari, Intel
Abhishek Tiwari, Intel +
Bowen Xue, Intel

== Dependencies

Expand All @@ -54,8 +56,14 @@ rely on APIs defined in this specification.*
== Overview

This extension introduces kernel properties to specify how or when control and
data signals can be passed into or out of an FPGA kernel. These properties are
meaningless on non-FPGA devices and can be ignored on such devices.
data signals can be passed into or out of an FPGA kernel.

On FPGA targets, regions of the circuit called clusters may be statically
scheduled. This extension also introduces kernel properties that specify how
statically-scheduled clusters should be implemented for an FPGA target.

These properties are meaningless on non-FPGA devices and can be ignored on such
devices.

== Specification

Expand Down Expand Up @@ -91,18 +99,18 @@ enum class streaming_interface_options_enum {
remove_downstream_stall
};

enum class register_map_interface_options_enum {
wait_for_done_write,
do_not_wait_for_done_write
};

struct streaming_interface_key {
template <streaming_interface_options_enum option>
using value_t = sycl::ext::oneapi::properties::property_value<
streaming_interface_key,
std::integral_constant<streaming_interface_options_enum, option>>;
};

enum class register_map_interface_options_enum {
wait_for_done_write,
do_not_wait_for_done_write
};

struct register_map_interface_key {
template <register_map_interface_options_enum option>
using value_t = sycl::ext::oneapi::properties::property_value<
Expand All @@ -117,25 +125,33 @@ struct pipelined_key {
std::integral_constant<size_t, pipeline_directive_or_initiation_interval>>;
};

enum class fpga_cluster_options_enum : /* unspecified */ {
stall_enable,
stall_free
};

struct fpga_cluster_key {
template <fpga_cluster_options_enum option>
using value_t = sycl::ext::oneapi::properties::property_value<
fpga_cluster_key,
std::integral_constant<fpga_cluster_options_enum, option>>;
};

template <streaming_interface_options_enum option>
inline constexpr streaming_interface_key::value_t<option> streaming_interface;

inline constexpr streaming_interface_key::value_t<
streaming_interface_options_enum::accept_downstream_stall>
streaming_interface_accept_downstream_stall;

inline constexpr streaming_interface_key::value_t<
streaming_interface_options_enum::remove_downstream_stall>
streaming_interface_remove_downstream_stall;

template <register_map_interface_options_enum option>
inline constexpr register_map_interface_key::value_t<option>
register_map_interface;

inline constexpr register_map_interface_key::value_t<
register_map_interface_options_enum::wait_for_done_write>
register_map_interface_wait_for_done_write;

inline constexpr register_map_interface_key::value_t<
register_map_interface_options_enum::do_not_wait_for_done_write>
register_map_interface_do_not_wait_for_done_write;
Expand All @@ -144,6 +160,17 @@ template<int pipeline_directive_or_initiation_interval>
inline constexpr pipelined_key::value_t<
pipeline_directive_or_initiation_interval> pipelined;

template<fpga_cluster_options_enum option>
inline constexpr fpga_cluster_key::value_t<option> fpga_cluster;
inline constexpr fpga_cluster_key::value_t<
fpga_cluster_options_enum::stall_enable_clusters> stall_enable_clusters;
inline constexpr fpga_cluster_key::value_t<
fpga_cluster_options_enum::stall_free_clusters> stall_free_clusters;

template <> struct is_property_key<streaming_interface_key> : std::true_type {};
template <> struct is_property_key<register_map_interface_key> : std::true_type {};
template <> struct is_property_key<fpga_cluster_key> : std::true_type {};

} // namespace sycl::ext::intel::experimental
```

Expand Down Expand Up @@ -218,6 +245,27 @@ inline constexpr pipelined_key::value_t<

If the property parameter (N) is not specified, the default value is `-1`.
Valid values for `N` are values greater than or equal to `-1`.

|`fpga_cluster`
|The `fpga_cluster` property is a request for the
compiler to implement statically-scheduled clusters using the specified
clustering method for all clusters in the annotated kernel, when possible. The
following values are supported:

* `stall_enable`: Directs the compiler to prefer generating an enable signal to
freeze the cluster when the cluster is stalled whenever possible.

* `stall_free`: Directs the compiler to prefer using an exit FIFO to hold
output data from clusters when the cluster is stalled whenever possible.

*Note*: Some clusters cannot be implemented with some cluster types so the
request isn't guaranteed to be followed.

The following properties have been provided for convenience:
`stall_enable_clusters`,
`stall_free_clusters`.

=======
|===

Device compilers that do not support this extension may accept and ignore these
Expand Down Expand Up @@ -298,4 +346,5 @@ q.single_task(KernelFunctor{a, b, c}).wait();
|Rev|Date|Author|Changes
|1|2022-03-01|Abhishek Tiwari|*Initial public working draft*
|2|2022-12-05|Abhishek Tiwari|*Make pipelined property parameter a signed int*
|========================================
|3|2024-01-05|Bowen Xue|*Add fpga_cluster property*
|========================================
Loading