-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][FPGA] Expose value_type and min_capacity from sycl::ext::intel::experimental::pipe #5896
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
Conversation
@tyoungsc I copied the changes to the specification and the implementation verbatim from your commit e1619fa, but noticed that the type of |
I don't know where this stems from :(. No, they will not be identical, |
Needless to say, the spec and the implementation should agree. I see that you also use |
IMO they should all match and be unsigned, since a negative value for any of them doesn't make sense. Whether we choose |
Thanks @gmlueck and @tyoungsc! @GarveyJoe do you agree with using |
The SPIRV API uses
|
Mike and I must have missed this when initially working on the pipes spec. The SPIR-V spec is clear that the capacity of a pipe must be a 32-bit unsigned integer but at the same time we don't want to break ABI compatibility. As a compromise we could keep the template parameter as a size_t and make the member a size_t but static_assert if the user tries to use a min_capacity that doesn't fit in an int32_t stating that our compiler can't handle pipes that large. Any existing code that uses a capacity that doesn't fit in an int32_t is presumably broken right now anyways since it can't be translated into SPIR-V so this shouldn't cause any regressions in compiling code. If we do this we should probably add to the spec a sentence saying that the maximum minimum_capacity supported by a device is implementation defined and that the implementation must emit a diagnostic if that maximum is exceeded. We could also require some reasonable minimum maximum minimum_capacity. There is lots of precedent for this in both C++ and SPIR-V, such as maximum array size (array declarations take a size_t but an implementation doesn't need to be able to create an array of size equal to maximum value a size_t can hold). |
|
||
// Static members | ||
using value_type = dataT; | ||
size_t min_capacity = min_capacity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size_t min_capacity = min_capacity; | |
static constexpr size_t min_capacity = min_capacity; |
This applies commit e1619fa to the experimental implementation to match the supported implementation.
#5471
#5895
Cc: @tyoungsc @shuoniu-intel @rho180 @zibaiwan