comp.lang.ada
 help / color / mirror / Atom feed
From: Gene <gene.ressler@gmail.com>
Subject: Re: GPUs and CUDA
Date: Tue, 12 Jul 2011 11:53:44 -0700 (PDT)
Date: 2011-07-12T11:53:44-07:00	[thread overview]
Message-ID: <4dc22324-ddea-4f3b-b51a-ce42ff93dd43@gv8g2000vbb.googlegroups.com> (raw)
In-Reply-To: 4e1c2153$0$2581$703f8584@news.kpn.nl

On Jul 12, 6:26 am, "ldries46" <bertus.dr...@planet.nl> wrote:
> |"Rego, P."  schreef in berichtnews:783efc18-a581-4ae2-bde4-04afa3568ff8@glegroupsg2000goo.googlegroups.com...
> |
> |>This would allow something like
> |> Pragma CUDA( Ralph );
> |>to indicate that the subprogram "Ralph" is to be run on the GPUs; and
> |>it would also allow non-CUDA enabled compilers to compile the source
> |>regardless of whether or not their compiler actually knows about CUDA.
> |
> |That's the idea. It would be very good.
>
> At this moment I don't know if this is a good idea, because CUDA is a
> language developped only for NVidia GPU's. One of the purposes of Ada I
> think is that a program can always be used on another computer with only the
> a simple recompilation. I would like a Pragma GPU( Ralph ) that can check
> which GPU is used and if that GPU has a CUDA like environment available.
>
> L. Dries

Indeed, GPUs are highly specialized processors that excel mostly at
certain kinds of floating point computations with limited branching
behaviors.  Compiler tricks to find good mappings for general code
onto GPUs are very much a current topic of research.  Nvidia's CUDA
implementation relies on language extensions to C and Fortran buit
into GCC.  I don't think it would be useful or even possible to map
GPU-style threads into Ada tasks.  So getting access to CUDA
primitives from Ada looks like a tough problem, certainly more than
adding a Pragma and tweaking the GNAT code generator.

On the other hand, there are many numerical libraries already
rewritten and tuned to exploit CUDA.  Ada bindings for these would be
very useful and straingthforwrd to build.





  reply	other threads:[~2011-07-12 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 21:20 GPUs and CUDA Rego, P.
2011-07-08 23:18 ` anon
2011-07-11 17:45   ` Anatoly Chernyshev
2011-07-11 18:38     ` Georg Bauhaus
2011-07-12  5:59       ` Anatoly Chernyshev
2011-07-13 16:44         ` Shark8
2011-07-13 14:52       ` anon
2011-07-11 23:28     ` Shark8
2011-07-12  2:02       ` Rego, P.
2011-07-12 10:26         ` ldries46
2011-07-12 18:53           ` Gene [this message]
2011-07-12 23:49           ` Shark8
2011-07-13 15:15             ` ldries46
2011-07-12  2:01     ` Rego, P.
2011-07-11 17:51   ` Nicholas Collin Paul de Glouceſter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox