Ticket #1 (closed defect: fixed)
Float constants are stored as double
| Reported by: | chak | Owned by: | seanl |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | CUDA backend | Version: | 0.7.1.0 |
| Keywords: | Cc: |
Description
Due to the design of Language.C (used to represent C AST by the CUDA backend), Float constants are emitted without any indication that they are Floats (and not Doubles). Hence, they are interpreted as Double by nvcc. On devices with compute capability 1.3 and up, those Doubles are converted to Float at runtime (which causes some overhead). On devices below 1.3, nvcc emits an error message of the form
ptxas /tmp/tmpxft_000013d3_00000000-2_dragon3.ptx, line 87; warning : Double is not supported. Demoting to float
Change History
Note: See
TracTickets for help on using
tickets.
