Does Numpy automatically detect and use GPU?

前端 未结 4 1417
情话喂你
情话喂你 2021-02-05 03:27

I have a few basic questions about using Numpy with GPU (nvidia GTX 1080 Ti). I\'m new to GPU, and would like to make sure I\'m properly using the GPU to accelerate Numpy/Pytho

4条回答
  •  梦如初夏
    2021-02-05 03:48

    Does Numpy/Python automatically detect the presence of GPU and utilize it to speed up matrix computation (e.g. numpy.multiply, numpy.linalg.inv, ... etc)?

    No.

    Or do I have code in a specific way to exploit the GPU for fast computation?

    Yes. Search for Numba, CuPy, Theano, PyTorch or PyCUDA for different paradigms for accelerating Python with GPUs.

提交回复
热议问题