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
[SYCL] Add Clang support for FPGA loop fusion function attributes (#2877)
This patch adds support for FPGA function attributes loop_fuse and
loop_fuse_independent. [[intel::loop_fuse(N)]] is a strong request,
to the extent possible, to fuse loops within the function, that are
contained in at most N-1 other loops within the function. If the
optional parameter N is omitted, it is a strong request, to the extent
possible, to fuse loops within the function that are not contained in
any other loop within the function. [[intel::loop_fuse_independent(N)]]
is used to guarantee that fusion safety analysis can ignore
negative-distance dependences between these loops.
FrontEnd Specifications:
The attributes take one optional parameter, a constant integral
expression between 0 and 1024*1024. The paramter may be a template
parameter.
The same function definition can have atmost one of these two attributes.
The attributes can be applied explictly to kernel. However, attributes
should not be propagated to callers i.e it should not be propagated from
device functions to kernel.
LLVM IR is function metadata as follows:
define i32 @foo() !loop_fuse !0
!0 = !{i32 N, i32 D}
where N is the value specified by the optional attribute argument. If
the optional argument is omitted, N is set to 1. D is equal to 0 for
[[intel::loop_fuse]] and 1 for [[intel::loop_fuse_independent]].
Signed-off-by: Elizabeth Andrews <[email protected]>
0 commit comments