Luca Salucci <lucasalu...@libero.it> wrote on 01/28/2014 07:33:30 AM:

> Hello! I am experimenting with X10 and I am mainly focused on the
> GPU support. My project has multiple files and some of them contain
> methods annotated with the @CUDA directive, so they should be
> compiled with the -NO_CHECKS -STATIC_CHECKS option. On the other
> hand I DO NOT want to compile my main .x10 file (which uses those
> with the @CUDA) with these options.
>
> What is the proper way to achieve this?
>
> I tried to compile the @CUDA files at first then the main without -
> NO_CHECKS -STATIC_CHECKS, but during the second compilation it
> recompiles everything.
>

After poking around in the compiler, I updated the web page to clarify
things.

The -NO_CHECKS argument is not required.  We end up disabling the null
pointer, array bounds, and divide by zero checks when compiling the kernels
with nvcc independent of the presence/absence of -NO_CHECKS.  You might get
better host code performance by compiling with -NO_CHECKS, but it has no
impact on the performance (or safety) of the kernel code when running on
the GPU.

The -STATIC_CHECKS argument is advisable, but not absolutely required.  If
the kernels contain X10 code that requires a dynamic check to be generated,
then nvcc compilation of the generated C++ code for the kernel will fail.
-STATIC_CHECKS ensures this won't happen (by ensuring such checks are never
generated in any part of the program).  However, if your larger X10
application won't compile with -STATIC_CHECKS (because it is depending on
the generation of dynamic checks), as long as there are no dynamic checks
in the kernels themselves it should still work.

BTW,  we've fixed a couple problems with GPU support earlier this month
that were present in X10 2.4.0 and 2.4.1.  The fixes will be in the
upcoming 2.4.2 release (about two weeks away), but until then if you are
experimenting with X10 and GPUs it would be best to pick up X10 from the
current svn trunk and built it from source yourself.


--dave
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to