On Wednesday 21 October 2009 21:40:33 Antony Vennard wrote:
> Hi All,
>
> I've been trying to get my head around how to attack CUDA and MPIR and
> bring the two together. So far I've come up with doing the following:
>
> 1) mpn implementation should be in mpn/cuda. This folder has,
> essentially, a copy of "generic" but with things like add_n.c
> implemented in add_n.cu (or it will have). This bit I think makes sense
> 2) This bit not so. I added --enable-cuda as an option to configure,
> which is fine and dandy, BUT, config.status links to the x86_64 code,
> which is correct. The question is, do we treat cuda as a cpu type? It
> effectively is... being where the processing will be done, if so, do we
> rely on the user setting ./configure --host=cuda or something?
> 3) I thought, from my original plan, of editing the Makefile in mpn to
> only include compiler options and rules for %.cu.o and nvcc and all the
> cuda-related stuff if --enable-cuda was set. However... this isn't what
> I'm now thinking.
>
> Thoughts on this anyone? Sorry, still trying to get my head around the
> build system a little... but I think changing the host type, modifying
> config.status to link mpn/cuda to mpn as needed and change the
> appropriate makefiles is the way to go. Think, that is...
>

I'm not sure if its the best long term solution , we will have to see how it 
all works out , but to get going I can think of no easier way. It may be 
easier for me to add in a new cpu type rather than try to explain how to do 
it. It will take me longer to figure out the new git system.

If I set up a new cpu "cuda" , I dont know how to autodetect it , but we can 
force any build with ./configure --build=cuda-unknown-linux-gnu , ideally   --
enable-cuda could force this build (or autodetect) , this would set mpn-paths 
and compiler options (at least for gnu/gcc) . I am assuming we are only x86_64 
based , which even if we are not it will do to get started. Adding rules for 
cuda compiler should be straightforward once we have an example cuda file and 
how to compile it. Are you using "cuda1" on tarbox ?

Jason



> NB if you just want to look at some of my changes, try
> http://vennard.org.uk/gitweb/?p=mpir.git;a=shortlog;h=refs/heads/av_cuda
> (yes, it's messy).
>
> Thanks,
>
> Antony


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to