-
Notifications
You must be signed in to change notification settings - Fork 52
Clarify that default real- or complex-valued floating-point data types may depend on the target device capabilities #508
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
Comments
@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 |
@rgommers If a user has a choice of devices, he/she should select the device that supports double precision if this is important for the application by using, e.g.
The first one does not support double precision floating point type, while the second one does. Intel Max Series of GPUs support double precision floating point types, so in not too distant future this issue is not going to be a problem. |
I guess that's asking quite a bit from a user. In my experience they often won't know if that is the case. If they consider the question at all. I suspect it's a footgun, where one offloads and is happy with faster compute, and then silently gets results with low accuracy.
Rather than updating the text, maybe we could turn this into a |
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. |
Since we discussed it in the meeting: It also seems a bit strange to me to have dtype depend on implicit settings (i.e. device not dtype itself). But if that is the choice you have, then adding the note seems good. |
I missed the meeting, is the conclusion to add the suggested note? In this case, it seems we suddenly jump from "default dtypes per library" to "default dtypes per device per library"? I guess I better watch the recording... |
Yes, that seems reasonable.
That's not how I would characterize that note. The spec requires "default dtypes per library", and the note mainly acknowledges that if device capabilities differ a lot, then multi-device libraries may have to deviate (and if they do, they should very clearly document that).
There wasn't much discussion on this topic. |
Any explicit user |
I see, thanks for clarification guys! |
I opened a PR for this: gh-515 |
In description of "Default Data Types" in "data_types.rst" we state:
Since HW support for floating point data-types varies across devices, and can be queried using
dev.has_aspect_fp64
(ref) anddev.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 sayHere host platform is the platform (Windows/Linux/Mac, etc) of the host portion of SYCL program, i.e. platform of the Python interpreter.
The text was updated successfully, but these errors were encountered: