pyCUDA vs C performance differences?

后端 未结 4 1678
天涯浪人
天涯浪人 2021-02-02 13:27

I\'m new to CUDA programming and I was wondering how the performance of pyCUDA is compared to programs implemented in plain C. Will the performance be roughly the same? Are the

4条回答
  •  独厮守ぢ
    2021-02-02 14:13

    Make sure you're using -O3 optimizations there and use nvprof/nvvp to profile your kernels if you're using PyCUDA and you want to get high performance. If you want to use Cuda from Python, PyCUDA is probably THE choice. Because interfacing C++/Cuda code via Python is just hell otherwise. You have to write a hell lot of ugly wrappers. And for numpy integration even more hardcore wrap-up code would be necessary.

提交回复
热议问题