青苹果未删减版,伊藤弘美,启亨官网
pytorch 官网 60 分钟入门教程在介绍什么是 pytorch 时有一句话:a replacement for numpy to use the power of gpus
pytorch 是 numpy 的替代品,可以使用gpu的强大功能。难道强大的 numpy 不利用 gpu?
stack overflow 上有同样的问题:does numpy automatically detect and use gpu?
给出的回答是:numpy 不会主动检测并利用 gpu。
而为了利用 gpu,numpy 有很多替代品,像 cupy、numba,当然 pytorch 也算一种。
博客 numpy gpu acceleration - scott sievert 中做了一些实验,查看 numpy without mkl、numpy with mkl、以及 cudamat 三者在执行矩阵乘法a@b
的时长:
intel® math kernel library (intel® mkl) optimizes code with minimal effort for future generations of intel® processors.
pytorch
does numpy automatically detect and use gpu?
numpy gpu acceleration - scott sievert
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
python求numpy中array按列非零元素的平均值案例
网友评论