caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eray Ozkural <examachine@gmail.com>
To: Basile STARYNKEVITCH <basile@starynkevitch.net>
Cc: caml-list@inria.fr, Emmanuel Chailloux <Emmanuel.Chailloux@lip6.fr>
Subject: Re: [Caml-list] How to write a CUDA kernel in ocaml?
Date: Tue, 15 Dec 2009 18:20:51 +0200	[thread overview]
Message-ID: <320e992a0912150820l4d36e4e0s24dc7cc084c9fc29@mail.gmail.com> (raw)
In-Reply-To: <4B27B442.9030300@starynkevitch.net>

On Tue, Dec 15, 2009 at 6:07 PM, Basile STARYNKEVITCH
<basile@starynkevitch.net> wrote:
> Eray Ozkural wrote:
>>
>> Hello there,
>>
>> I've looked at the CUDA bindings for ocaml, but it seems the kernels
>> were in C, am I right? How can I write the kernel in ocaml? I have an
>> ocaml program that is badly in need of parallelization and it fits the
>> NVIDIA architecture. If ocaml changes are required please explain to
>> me a little, I have sufficient knowledge of compilers, I've worked on
>> a commercial C-to-FPGA compiler project for 2 years. Of course it
>> would be best if I can just handle it with a makefile :)
>
> You cannot do that today easily.
>
> The French OpenGPU project -funded by French public money
> http://www.competitivite.gouv.fr/spip.php?article581 (in which I will be a
> partner)- will start in january 2010 to deal with such issues (probably with
> OpenCL, not CUDA). There won't be usable results soon (and I have no idea if
> at end of the project, there will be a simple solution to your problem).
>
> You could try to help the OpenGPU partners involved. Ask Emmanuel Chailloux
> (in CC).
>
> If you need today to call a CUDA kernel from Ocaml, you have to use C!

It's great to hear such an effort, I will be following the
developments. Of course OpenCL will be just as good. Pretty similar,
anyway. I've seen some restrictions in OpenCL's C99 extension for
compiling kernels, which is *not good* and might ultimately impair the
implementation of a functional language.  I don't see how one could
think of putting any restrictions. We didn't have to invent any
restrictions when compiling to hardware!

At any rate, the obvious question from a compiler standpoint is,
cannot we compile ocaml to C, is there a way to translate to C first
and then to whatever works for kernel? I know little about the ocaml
compiler so please forgive my naive questions.

Best,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct


  reply	other threads:[~2009-12-15 16:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 15:37 Eray Ozkural
2009-12-15 16:07 ` [Caml-list] " Basile STARYNKEVITCH
2009-12-15 16:20   ` Eray Ozkural [this message]
2009-12-15 16:29     ` Basile STARYNKEVITCH
2009-12-15 17:46       ` Eray Ozkural
2009-12-15 23:18       ` David Allsopp
2009-12-16  0:39         ` Jon Harrop
2009-12-16 13:41           ` Mattias Engdegård
2009-12-16 13:47             ` Eray Ozkural
2009-12-17  0:34               ` Philippe Wang
2009-12-17  6:45                 ` Eray Ozkural
2009-12-17 10:59                   ` Philippe Wang
2010-01-12  6:15             ` Eray Ozkural
2009-12-16  6:26         ` Basile STARYNKEVITCH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=320e992a0912150820l4d36e4e0s24dc7cc084c9fc29@mail.gmail.com \
    --to=examachine@gmail.com \
    --cc=Emmanuel.Chailloux@lip6.fr \
    --cc=basile@starynkevitch.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).