# PGI cuda code as ...

**URL:** <https://forums.developer.nvidia.com/t/pgi-cuda-code-as/132149>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [December 20, 2010, 2:30am UTC](https://forums.developer.nvidia.com/t/pgi-cuda-code-as/132149 "2010-12-20T02:30:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaYa\_Malik](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@MaYa\_Malik](https://forums.developer.nvidia.com/u/MaYa_Malik)\
**Post date:** [December 20, 2010, 2:30am UTC](https://forums.developer.nvidia.com/t/pgi-cuda-code-as/132149/1 "2010-12-20T02:30:17Z")

</div>

Hi

I have implemented code in PGI. we know that at some point PGI convert the code in cuda to communicate with GPU.

and we also know that we also have cuda language with its own functions like cudaMalloc etc

my question is, is it possible to run PGI cuda extracted code on cuda language ?  
I do not know whether I have explained my question clearly or not?  
plz let know if its not clear.

thanks

MaYa

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [December 21, 2010, 1:23am UTC](https://forums.developer.nvidia.com/t/pgi-cuda-code-as/132149/2 "2010-12-21T01:23:47Z")

</div>

Hi MaYa,

You can keep the generated CUDA C code using the “-ta=nvidia,keepgpu” flag. The caveat is that the generated code is highly optimized, very low level CUDA C. Therefore hard to read and follow.

Hope this helps,  
Mat

---

<div class="post-metadata">

**Author:** ![MaYa\_Malik](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@MaYa\_Malik](https://forums.developer.nvidia.com/u/MaYa_Malik)\
**Post date:** [December 22, 2010, 3:53pm UTC](https://forums.developer.nvidia.com/t/pgi-cuda-code-as/132149/3 "2010-12-22T15:53:32Z")

</div>

Hi Mat

Yes that extracted cuda code is really difficult to understand.  
thanks i got my ans :)

MaYa
