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][sycl-post-link] Add post-struct padding in descs and fix blob size calculations (#5376)
These changes fix two related issues:
1. The runtime does not correctly handle the offset in specialization
constant descriptors as it does not take into account the size of the
previous element in composite types, effectively always adding
padding between each element equal to at least the size of the
previous element. This is fixed by changing it to keep track of the
local offset into the current composite type and subtracting that
from the offset of the descriptor to find the required padding.
2. Composite types may have padding at the end. sycl-post-link does not
currently generate enough information for the runtime to take the
additional padding into account when calculating the size of the
specialization constant default value blob. This is fixed by
inserting an additional descriptor after the last element of
a composite type with end-padding. This "padding-descriptor" will
have the offset right after the last element of the composite type
and a size corresponding to the size of the required padding.
padding-descriptors all have the same ID, namely the maximum value
of the (unsigned) ID.
Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
0 commit comments