About the constant memory usage in CUDA Fortran

Dear CUDA Fortran-ers:

I’m optimizing my cuda fortran project, and considering using the constant memory to reduce the access latencies from global memory.
Can I be given some programs about how to use it?

I try to replace the “device” attributes to “constant”, then it comes the error saying “copyin memcpy failed”, error code 17.

I’m using the IDE “Visual fortran with vs08”, win-32 XP.

Best wishes.

Hi benstone,

The “constant” attribute is best applied to module data since it can then be accessed from the host (read and write) as well as from all your module device kernels (read only).

As for the error you’re see, can you please post a small example of how you’re use “constant”?