(j3.2006) IEEE and the GPU world
John Reid
John.Reid
Wed Jun 23 12:19:27 EDT 2010
Bill Long wrote:
>
> The IEEE feature in F03 is becoming the topic of discussion with the
> advent of the Chinese GPU system hitting #2 on the Top 500 list, and
> also users getting access to the GPU's in their laptops via schemes like
> OpenCL.
>
> While GPU's support the hardware bit patterns for IEEE floating point
> format (more or less a requirement for them to be useful at all for
> floating point in a shared data environment), they do not support
> things like exception flags or interrupts (halting), mainly for
> performance reasons.
>
> The question is what values should users expect from routines like
> IEEE_SUPPORT_HALTING and IEEE_SUPPORT_FLAG? The standard is worded as
> if there is a single "processor". But the common configuration will be,
> at least at the beginning, of a combination of a "normal" processor
> (x86_64, for example) for which these inquiry functions would return
> true, and a GPU for which false is the right answer. Does the presence
> of the GPU code pollute the entire program (functions return false no
> matter where called in the program), or do they return true if called in
> part of the code that is compiled into instructions for the normal
> processor, and false if called from the parts of the code compiled for
> the GPU? Note that the programmer would not necessarily know which
> parts of the program end up executing on which hardware type. Insights
> from the designers of this feature would be particularly interesting.
I think the standard is pretty clear. 14.1:p2 says
"If IEEE_EXCEPTIONS or IEEE_ARITHMETIC is accessible in a scoping unit, the
exceptions IEEE_OVERFLOW and IEEE_DIVIDE_BY_ZERO are supported in the scoping
unit for all kinds of real and complex IEEE fl oating-point data. Which other
exceptions are supported can be determined by the inquiry function
IEEE_SUPPORT_FLAG (14.11.27); whether control of halting is supported can be
determined by the inquiry function IEEE_SUPPORT_HALTING. ..."
and 14.1:p3 says
"If a scoping unit does not access IEEE_FEATURES, IEEE_EXCEPTIONS, or
IEEE_ARITHMETIC, the level of support is processor dependent, and need not
include support for any exceptions. If a flag is signaling on entry to
such a scoping unit, the processor ensures that it is signaling on exit. If a
flag is quiet on entry to such a scoping unit, whether it is signaling on exit
is processor dependent."
Cheers,
John.
More information about the J3
mailing list