Frage

I understand that pinned memory allocated by "cudaHostAlloc" can be transferred more efficiently to device than "malloc"'ed memory can. However, I think "cudaHostAlloc" can only be compiled by cuda compiler. My scenario is to use cublas API without cuda compiler, and it seems that cublas doesn't provide function for pinned memory allocation from the handbook, or maybe I miss something...

War es hilfreich?

Lösung

cudaHostAlloc() is implemented in the CUDA Runtime API. You don't need to compile with nvcc to use CUDA API calls, you can just include the appropriate header (e.g. cuda_runtime_api.h) and link with the runtime library (cudart).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top