POV-Ray : Newsgroups : povray.programming : CUDA - NVIDIA's massively parallel programming architecture Server Time
17 May 2024 04:43:39 EDT (-0400)
  CUDA - NVIDIA's massively parallel programming architecture (Message 16 to 25 of 25)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 22 Apr 2007 04:09:25
Message: <462b1834@news.povray.org>
_theCardinal <_the### [at] yahoocom> wrote:
> There are 2 typical variants of FPU around right now - 32 bit and 64 bit,
> matching the type of processor they are included on.  Having a 64 bit FPU
> is necessary for doing 64 bit arithmetic in hardware - but is not
> sufficient.  It would also require a 64 bit operating system such as
> windows XP x64, vista 64-bit, or a version of Unix compiled for 64 bit
> systems.  All mainstream 64 bit processors can run in a limited 32-bit mode
> to back-support 32 bit execution, if this is the case the precision
> available is still only 32 bit in hardware.

  You have a serious confusion there, mister.

  How do you think POV-Ray can use 64-bit floating-point numbers
*in hardware* even with 32-bit computers?

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 22 Apr 2007 04:17:42
Message: <462b1a26@news.povray.org>
_theCardinal <_the### [at] yahoocom> wrote:
> "But double precision is actually 64bit."
> To be technical the number of bits used for a double is implementation
> dependent.  The requirement is simply that a float <= double.  It is up to
> compiler to decide how to interpret that.  Using double in lieu of float
> simply indicates the desire for additional precision - not the requirement
> (in C and C++).  Hence it is impossible in general to say povray is using
> 64 bits.  See: The C++ Programming Language (TCPL) 74-75.

  That may be true *in theory*. In practice it's not compiler-dependent
but hardware-dependent. Since basically all existing hardware (including
non-intel one) uses IEEE 64-bit double-precision floating point numbers,
that's what all compilers use too. It wouldn't make sense using anything
else.

  So yes, you can say *for sure* that POV-Ray uses 64-bit floating point
numbers. I challenge you to mention a computer where POV-Ray runs and where
'double' is not 64 bits long.

> Compilers may have more than a few techniques to simulate 64 bit computation
> on a 32 bit architecture, but I am not experienced enough in compiler design
> to state them within reasonable doubt.

  You have a serious misconception about FPUs and double-precision floating
point numbers.
  Compilers don't need to simulate anything: Intel FPUs have supported 64-bit
floating point numbers since probably the 8087. That has nothing to do with
the register size of the CPU, as the FPU is quite independent of it.

>  Its worth noting that the time lost
> in doing 2 ops instead of 1 is easily regained in shifting from 1-2
> processors to an array of processors, so this is not a concern provided the
> utilization of the array is sufficiently high.

  1) There's no need to do "2 ops instead of 1" when speaking about 64-bit
floating point numbers.
  2) Even if it was, it's not possible to perform floating point arithmetic
with a larger floating point type by simply doing 2 operations instead of
the regular 1.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 22 Apr 2007 04:18:51
Message: <462b1a6b@news.povray.org>
_theCardinal <_the### [at] yahoocom> wrote:
>  A: CUDA supports the C "double" data type.  However on G80
>     (e.g. GeForce 8800) GPUs, these types will get demoted to 32-bit
>     floats.  NVIDIA GPUs supporting double precision in hardware will
>     become available in late 2007."

  And my questiom is: When it supports 64-bit floating point numbers,
how will it be different from current FPUs?

-- 
                                                          - Warp


Post a reply to this message

From: Christoph Hormann
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 22 Apr 2007 07:05:03
Message: <f0ff97$c8d$1@chho.imagico.de>
Warp wrote:
> _theCardinal <_the### [at] yahoocom> wrote:
>>  A: CUDA supports the C "double" data type.  However on G80
>>     (e.g. GeForce 8800) GPUs, these types will get demoted to 32-bit
>>     floats.  NVIDIA GPUs supporting double precision in hardware will
>>     become available in late 2007."
> 
>   And my questiom is: When it supports 64-bit floating point numbers,
> how will it be different from current FPUs?

The most important difference probably is that the GPUs are closed 
products with no comprehensive specifications being available.  If you 
like to use them you have to use the proprietary SDKs provided by Nvidia 
and available only for the platforms they support (if you are lucky they 
offer a x86-linux version - usually working only in combination with 
their closed hardware drivers, if not it's Windows only).

I would strongly suggest anyone who is thinking about integrating 
something like that with POV-Ray to think twice about putting much work 
into a technology that is almost certainly outdated and forgotten within 
2-3 years.

Christoph

-- 
Views of the Earth: http://earth.imagico.de/
Images, include files, tutorials: http://www.imagico.de/
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Warp
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 22 Apr 2007 08:34:12
Message: <462b5643@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> >   And my questiom is: When it supports 64-bit floating point numbers,
> > how will it be different from current FPUs?

> The most important difference probably is that the GPUs are closed 
> products with no comprehensive specifications being available.  If you 
> like to use them you have to use the proprietary SDKs provided by Nvidia 
> and available only for the platforms they support (if you are lucky they 
> offer a x86-linux version - usually working only in combination with 
> their closed hardware drivers, if not it's Windows only).

  I'm also wondering about what advantages there could be compared to
current FPUs.

  There are obvious advantages to the graphics which the graphics card
itself renders. Currently vertex and pixel shaders have no or very little
floating point math support, and adding that support will probably allow
more stunning graphics effects to be achieved.

  However, how could POV-Ray benefit from this? What will this offer for
POV-Ray that current FPUs don't?

  Besides, there will probably be data transfer overhead. Games can simply
upload their vertex and pixel shader code into the graphics card and then
let the graphics card do what they do. Games don't need the results back.

  POV-Ray does need the results of the calculations back. How is it going
to do that? And what advantages will this bring to it compared to the
current regular usage of the FPU (which has in practice no overhead)?

  Sure, some graphics software are using modern graphics cards to perform
eg. image transformations and filters. But that's a much simpler task.
The software simply uploads a shader to the graphics card, tells it to
apply it to a texture, and the graphics card does that. It's a simple task
which the graphics card can do all by itself. When it's done, the software
can simply read the resulting image.
  This is a bit different from what POV-Ray does. POV-Ray can't work by
simply applying a shader to an image. POV-Ray is a raytracer.

-- 
                                                          - Warp


Post a reply to this message

From: Chambers
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 20 May 2007 13:21:22
Message: <46508392$1@news.povray.org>
Warp wrote:
> Chambers <ben### [at] pacificwebguycom> wrote:
>> Perhaps if 
>> Intel surprises everyone, and releases their next graphics chip as a 
>> double precision FP monsters, we'd be able to take advantage of that, 
> 
>   Exactly how would it be different from current FPUs?
> 

Because it would be on a graphics chip?

There has been some serious speculation that Intel will simply release a 
chip with something like 256 double-precision FPUs on it as Unified 
Shaders, and rely on shader programs to provide *all* graphics 
functionality (that is, they wouldn't hardcode *any* graphics stuff at all).

While it would be slower than an equivalent unit from nVidia or DAAMIT, 
it would also be much more flexible, and utilizing it for non-graphics 
work (like HPC) would be extremely easy compared to today's cards.

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Chambers
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 20 May 2007 13:24:05
Message: <46508435@news.povray.org>
Warp wrote:
>   Compilers don't need to simulate anything: Intel FPUs have supported 64-bit
> floating point numbers since probably the 8087. That has nothing to do with
> the register size of the CPU, as the FPU is quite independent of it.

I think it was actually the 287, but I could very easily be wrong about 
that :)

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Chambers
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 20 May 2007 13:29:53
Message: <46508591@news.povray.org>
Warp wrote:
>   I'm also wondering about what advantages there could be compared to
> current FPUs.

The main difference, Warp, is the shear number of execution units.  On a 
CPU, you're looking at what, 3-5 FPUs *at most* per core, meaning a Quad 
core chip would have 12-20.

On a GPU, we're now seeing >100 execution units.

>   Besides, there will probably be data transfer overhead. Games can simply
> upload their vertex and pixel shader code into the graphics card and then
> let the graphics card do what they do. Games don't need the results back.

One of the main reasons the switch was made from AGP to PCIe is that 
PCIe is bidirectional, allowing efficient communication in both 
directions.  Although previous generations of cards don't take advantage 
of this, the 8800 series does (a little bit), and future cards are 
likely to as well.

I looked into the CUDA to see if it was something I could take advantage 
of for personal projects, and unfortunately it isn't.  There are too 
many restrictions on what data may be accessed, what data has to be 
shared, et cetera, for it to be useful for something as complex as 
POV-Ray at this time.  Perhaps with future revisions (based on future 
cards) it will be more flexible, and thus more usable, but for now it 
won't help.

I tried to find information on DAAMIT's cards and programming them, but 
I couldn't find anything public on the Web.

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Warp
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 20 May 2007 13:59:31
Message: <46508c82@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> One of the main reasons the switch was made from AGP to PCIe is that 
> PCIe is bidirectional, allowing efficient communication in both 
> directions.

  Compare the data transfer speed between the CPU and the FPU with the
data transfer speed between the CPU and the GPU. Now consider the sheer
amount of data which has to be transferred for a raytracer.

  Unless you can implement the raytracer as a shader, I don't think there
can't be any advantage.

-- 
                                                          - Warp


Post a reply to this message

From: Chambers
Subject: Re: CUDA - NVIDIA's massively parallel programming architecture
Date: 20 May 2007 16:34:03
Message: <4650b0bb$1@news.povray.org>
Warp wrote:
> Chambers <ben### [at] pacificwebguycom> wrote:
>> One of the main reasons the switch was made from AGP to PCIe is that 
>> PCIe is bidirectional, allowing efficient communication in both 
>> directions.
> 
>   Compare the data transfer speed between the CPU and the FPU with the
> data transfer speed between the CPU and the GPU. Now consider the sheer
> amount of data which has to be transferred for a raytracer.
> 
>   Unless you can implement the raytracer as a shader, I don't think there
> can't be any advantage.
> 

Well, the whole point of CUDA and other such ventures is that you 
offload a program (not directly comparable to a shader, in this 
instance) or parts of one to the GPU, and it only returns the result.

In other words, POV-Ray wouldn't say to the GPU "Trace this ray, and now 
get this ray, and now do this texture..."  Rather, it would say "Here's 
this scene, here's the camera, now return the finished picture."

Unfortunately, the GPUs just aren't flexible enough yet.  However, 
within one or two more generations, they probably will be...

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.