Clarify that default real- or complex-valued floating-point data types may depend on the target device capabilities
See original GitHub issueIn description of “Default Data Types” in “data_types.rst” we state:
The default real-valued floating-point and complex floating-point data types must be the same across platforms.
Since HW support for floating point data-types varies across devices, and can be queried using dev.has_aspect_fp64
(ref) and dev.has_aspect_fp16
(ref), the real-valued floating-point and complex floating-point data types must either always be “float32” or depend on the capability of the device.
I think having HW capability-tailored default floating-point types is more useful.
This issue is to discuss changing the verbiage in "data_types.rst"
. From SYCL perspective, it would be appropriate to say
The default real-valued floating-point and complex floating-point data types may depend on capabilities of the target device but must be the same across host platforms.
Here host platform is the platform (Windows/Linux/Mac, etc) of the host portion of SYCL program, i.e. platform of the Python interpreter.
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
I am ok with adding of the note box. I would change the “device type” verbiage to “device”. A consumer laptop may have an integrated Iris Xe which does not support double precision floating-point type and a dedicated GPU card which does. Both devices are of type GPU but have different HW features.
@oleksandr-pavlyk isn’t that a dangerous design choice for your library? In a typical workflow, I imagine that users develop on a standard development machine (Linux/Windows/macOS), and then once things work move on to target an accelerator device. If at that point you get a silent precision change, that can easily lead to problems.
In practice, don’t you choose
float32
as the default, since it works everywhere?