-
Notifications
You must be signed in to change notification settings - Fork 67
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
Generic type name descriptions: massive problem #353
Comments
If I understand correctly, that table does not intend to reference aliases at all, i.e. if we take This is described in 4.17.1. Description of the built-in types available for SYCL host and device:
|
That is correct, but 1) the table explicitly contains |
So not to impede the CTS extension, I took for the tests that in the table and function definitions |
I think we should do this. The aliases defined in 4.14.2.2 and 4.14.3.2 are very confusing, and now it appears that even the spec authors got confused! There is already a proposal in #335 to fix the aliases, and I think we should do this in SYCL 2020 before anyone has adopted it. |
aliases are not fixed-width types and we should only test fundamental types or just remove them instead of adding ones with different names |
drafting phase |
I've got into a blocking issue on CTS because of this.
In the Table 165 there is an explosive mixture of types following vector and marray aliases. For example,
charn
gentype includeschar{n}, mchar{n}, marray<{N},char>
that (excluding misprint in marray defeinition) effectively coverschar
inmarray
, butint8_t
inchar{n}
andmchar{n}
. Then all the signatures that include e.g.sgeninteger
are inherently contradictory assgeninteger
does not containint8_t
to matchchar{n}
. Another aspect of the problem arises for e.g.genlong
where it is possible to havesycl::long2 = sycl::vec<int64_t, 2>
pluslong = int32_t
(this is totally standard C++ behavior, for example in MSVC) and this generic type mixes 32 and 64-bit types.The solution to the part of the problem was suggested in this PR, but it is only palliative.
There are two ways out:
vec<char, {n}>
in the table instead ofchar{n}
forgenchar
. This, however, leads to a potential leak in function definitions: then functions are not required to support e.g.short2
as it is possible that on the C++ systemint16_t
is not in the list of fundamental types at all (for example 8-bitchar
and 32-bitshort
andint
are fully compatible with the standard, and fixed types are not required to be aliases to any of fundamental types). This can be avoided by careful extension of the type tree of table 165 and a requirement that all fixed-size types should be supported for host and device in Sec. 5.5.cl_
types, but in the current state that tries to align with C++ types it provides a lot of ways to shoot yourself in the foot.The text was updated successfully, but these errors were encountered: