question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarify that default real- or complex-valued floating-point data types may depend on the target device capabilities

See original GitHub issue

In 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:closed
  • Created 10 months ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
oleksandr-pavlykcommented, Nov 16, 2022

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.

1reaction
rgommerscommented, Nov 16, 2022

@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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ArcGIS field data types
When you create feature classes and tables, you select a data type for each field. The available types include a variety of number...
Read more >
Primitive Data Types (The Java™ Tutorials > Learning the ...
A variable's data type determines the values it may contain, plus the operations that may be performed on it. In addition to int...
Read more >
Chapter 4. NumPy Basics: Arrays and Vectorized Computation
Since NumPy is focused on numerical computing, the data type, if not specified, will in many cases be float64 (floating point). Table 4-1....
Read more >
Data types | BigQuery - Google Cloud
All data types are supported except for: GEOGRAPHY; JSON; ARRAY; STRUCT. Special floating point values are grouped in the following way, including both ......
Read more >
Understanding Data Types in Go - DigitalOcean
Understanding Data Types in Go · Background · Integers · Floating-Point Numbers · Sizes of Numeric Types · Booleans · Strings · Declaring...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found