How to open a file in kernel?

Hi all,
Is it possible to open a file in kernel program of GPU device?

No, you cannot!

Your file libraries are written for your host CPU (intel , Ppc or whatever.)

The GPU cannot execute these libraries! The GPU can only manipulate data and return result in GPU’s global memory. Dats all it can do.

You can open the file in host CPU code and transfer the contents to the GPU global memory and then schedule a kernel that acts on that data.


You need to load the data on the CPU and copy the data to the card. A graphics card has only memory and display i/o.

I really appreciate your reply!