-
Notifications
You must be signed in to change notification settings - Fork 68
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
Do fp16
and fp64
aspects cover half *
and double *
data types?
#526
Comments
I would say that would require typeless pointer representation in SPIR-V. I can imagine that
|
My initial thought is similar to @bader, any use of the type |
Please propose a PR for the CTS and the Spec. |
This commit splits the testing of atomic_ref with double * into separate tests to allow for fp64 support checks. This is related to KhronosGroup/SYCL-Docs#526. Signed-off-by: Larsen, Steffen <[email protected]>
CTS PR: KhronosGroup/SYCL-CTS#845 |
CTS PR merged. Awaiting PR on spec. |
I've been looking at
atomic_ref_add_sub_op_all_types_test_pointers.cpp
CTS test failure on a device which does not supportfp64
and realized that the spec is likely not clear enough about what exactly is guarded byfp16
andfp64
aspects.atomic_ref
tests for pointers unconditionally coverdouble *
data type:atomic_ref_common.h:166
. When implementation targets SPIR-V as intermediate representation for SYCL kernels, use ofdouble *
leads to emission of the following instructions sequence in SPIR-V module:Which makes it legal for a backend to discard such SPIR-V module if
double
is not supported by a target device. However, at SYCL level the app only usesdouble *
and never dereferences that pointer, so there are no direct use of that data type.The question is what was the intent of the spec with
fp16
andfp64
aspects? Are they expected to also guard pointers to those optional data types?I guess that from user experience point of view, pointers to optional data types should be allowed as long as they are not dereferenced on a device which doesn't support those types. Should this be clarified somehow in the SYCL 2020 spec?
Note: SPIR-V spec has special capability
Float16Buffer
capability, which allows pointers tohalf
in a module, but doesn't allow their dereferencing. Unfortunately, there is no similarFloat64Buffer
capability.The text was updated successfully, but these errors were encountered: