如何加速python代码--关于Numpy(CuPy)--Numpy(pycuda)--Numpy(pyopencl)--numba--MinPy--阿里Mars等

参考书籍;

《Hands-On GPU Programming with Python and CUDA》by Dr. Brian Tuomanen

参考网站:

https://www.cnblogs.com/noluye/p/11517489.html

 

如何将Numpy加速700倍?用 CuPy 呀

https://github.com/cupy/cupy

例子:

https://github.com/cupy/cupy/tree/master/examples

教程:

https://docs-cupy.chainer.org/en/stable/tutorial/

社区:

https://groups.google.com/forum/#!forum/cupy

https://www.jiqizhixin.com/articles/2019-08-29-8

https://towardsdatascience.com/heres-how-to-use-cupy-to-make-numpy-700x-faster-4b920dda1f56

i7–8700k CPU
1080 Ti GPU
32 GB of DDR4 3000MHz RAM
CUDA 9.0

The latest version of cuDNN and NCCL libraries are included in binary packages (wheels). For the source package, you will need to install cuDNN/NCCL before installing CuPy, if you want to use it.

依赖CUDA cuDNN NCCL

pip install cupy
pip install cupy-cuda90
pip install cupy-cuda100
pip install cupy-cuda101


import numpy as np
import cupy as cp
import time
### Numpy and CPU
s = time.time()
*x_cpu = np.ones((1000,1000,1000))*
e = time.time()
print(e - s)### CuPy and GPU
s = time.time()
*x_gpu = cp.ones((1000,1000,1000))*
e = time.time()
print(e - s)

https://documen.tician.de/pycuda/

https://pypi.org/project/pycuda/

https://github.com/inducer/pycuda

https://mathema.tician.de/software/pycuda/

PyCUDA 文档中文翻译-Tutorial 中文版

https://zhuanlan.zhihu.com/p/32062796?utm_source=weibo


pyopencl 2019.1.2

https://github.com/inducer/pyopencl

https://mathema.tician.de/software/pyopencl/

https://wiki.tiker.net/PyOpenCL

https://documen.tician.de/pyopencl/


https://zhuanlan.zhihu.com/p/77307505

http://numba.pydata.org/

http://numba.pydata.org/numba-doc/latest/cuda/index.html

https://github.com/numba/numba

https://zhuanlan.zhihu.com/p/27152060


https://github.com/dmlc/minpy

https://minpy.readthedocs.io/en/latest/

https://minpy.readthedocs.io/en/latest/feature/limitation.html

专栏 | MinPy:剑气双修的武功秘籍

http://www.sohu.com/a/124626121_465975


Mars

https://www.jianshu.com/p/2c77b5b1f853

https://www.jiqizhixin.com/articles/2018-12-26-13

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值