Ticket #1 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Float constants are stored as double

Reported by: chak Owned by: seanl
Priority: minor Milestone:
Component: CUDA backend Version:
Keywords: Cc:


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

Changed 7 years ago by seanl

  • owner set to seanl
  • status changed from new to assigned

Changed 7 years ago by seanl

  • status changed from assigned to closed
  • resolution set to fixed

Changed 7 years ago by seanl

The patch for this ticket has been submitted.

Note: See TracTickets for help on using tickets.