19.11.2014 Views

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Compilation<br />

• pgfortran - PGI’s <strong>Fortran</strong> compiler<br />

– All source code with .cuf or .CUF is compiled as <strong>CUDA</strong> <strong>Fortran</strong> enabled<br />

au<strong>to</strong>matically<br />

– Flag <strong>to</strong> target architecture (eg. -Mcuda=cc35)<br />

– -Mcuda=emu specifies emulation mode<br />

– Flag <strong>to</strong> target <strong>CUDA</strong> Toolkit version (eg. -Mcuda=cuda5.0)<br />

– -Mcuda=fastmath enables faster intrinsics (__sinf())<br />

– -Mcuda=nofma turns off fused multiply-add<br />

– -Mcuda=maxregcount: limits register usage per thread<br />

– -Mcuda=ptxinfo prints memory usage per kernel<br />

• pgfortran -Mcuda -help for a full list

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!