https://developer.nvidia.com/how-to-cuda-Python

python is one of the fastest growing and most popular programming languages available. However, as an interpreted language, it has been considered too slow for high-performance computing.  That has now changed with the release of the NumbaPro Python compiler from Continuum Analytics.

CUDA Python – Using the NumbaPro Python compiler, which is part of the Anaconda Accelerate package from Continuum Analytics, you get the best of both worlds: rapid iterative development and all other benefits of Python combined with the speed of a compiled language targeting both CPUs and NVIDIA GPUs.

Getting Started

  1. If you are new to Python, the python.org website is an excellent source for getting started material.
  2. Read this blog post if you are unsure what CUDA or GPU Computing is all about.
  3. Try CUDA by taking a self-paced lab on nvidia.qwiklab.com. These labs only require a supported web browser and a network that allows Web Sockets. Click here to verify that your network & system support Web Sockets in section "Web Sockets (Port 80)", all check marks should be green.
  4. Watch the first CUDA Python CUDACast:
  5. Install Anaconda Accelerate
  6. First install the free Anaconda package from this location.
  7. Once Anaconda is installed, you can install a trial-version of the Accelerate package by using Anaconda’s package manager and running conda install accelerate.  See here for more detailed information.  Please note that the Anaconda Accelerate package is free for Academic use.

Learning CUDA

  1. For documentation, see the Continuum website for these various topics:

    • Learn more about libraries
    • See how to use vectorize to automatically accelerate functions
    • Writing CUDA directly in Python code
  2. Browse through the following code examples:
  3. Browse and ask questions on NVIDIA’s DevTalk forums, or ask at stackoverflow.com.

So, now you’re ready to deploy your application?
You can register today to have FREE access to NVIDIA TESLA K40 GPUs.
Develop your codes on the fastest accelerator in the world. Try a Tesla K40 GPU and accelerate your development.

Performance/Results

  • It’s possible to get enormous speed-up, 20x-2000x, when moving from a pure Python application to accelerating the critical functions on the GPUs.  In many cases, with little changes required in the code.  Some simple examples demonstrating this can be found here:
    1. A MandelBrot example accelerated with CUDA Python.  19x speed-up over the CPU-only accelerated version using GPUs and a 2000x speed-up over pure interpreted Python code.
    2. A Monte Carlo Option Pricer example accelerated with CUDA Python.  Achieved a 30x speed-up over interpreted Python code after accelerating on the GPU.

Alternative Solution - PyCUDA

Another option for accelerating Python code on a GPU is PyCUDA.  This library allows you to call the CUDA Runtime API or kernels written in CUDA C from Python and execute them on the GPU.  One use case for this is using Python as a wrapper to your CUDA C kernels for rapid development and testing.

GPU Accelerated Computing with Python的更多相关文章

  1. Chromium Graphics : GPU Accelerated Compositing in Chrome

    GPU Accelerated Compositing in Chrome Tom Wiltzius, Vangelis Kokkevis & the Chrome Graphics team ...

  2. INTERSPEECH 2015 | Scalable Distributed DNN Training Using Commodity GPU Cloud Computing

    一般来说,全连接层的前向和后向传递所需的计算量与权重的数量成正比.此外,数据并行训练中所需的带宽与可训练权重的数量成比例.因此,随着每个节点计算速度的提高,所需的网络带宽也随之增加.这篇文章主要是根据 ...

  3. Python的GPU编程实例——近邻表计算

    技术背景 GPU加速是现代工业各种场景中非常常用的一种技术,这得益于GPU计算的高度并行化.在Python中存在有多种GPU并行优化的解决方案,包括之前的博客中提到的cupy.pycuda和numba ...

  4. 常用python机器学习库总结

    开始学习Python,之后渐渐成为我学习工作中的第一辅助脚本语言,虽然开发语言是Java,但平时的很多文本数据处理任务都交给了Python.这些年来,接触和使用了很多Python工具包,特别是在文本处 ...

  5. 大数据分析与机器学习领域Python兵器谱

    http://www.thebigdata.cn/JieJueFangAn/13317.html 曾经因为NLTK的缘故开始学习Python,之后渐渐成为我工作中的第一辅助脚本语言,虽然开发语言是C/ ...

  6. Python 网页爬虫 & 文本处理 & 科学计算 & 机器学习 & 数据挖掘兵器谱(转)

    原文:http://www.52nlp.cn/python-网页爬虫-文本处理-科学计算-机器学习-数据挖掘 曾经因为NLTK的缘故开始学习Python,之后渐渐成为我工作中的第一辅助脚本语言,虽然开 ...

  7. [转载]Python兵器谱

    转载自:http://www.52nlp.cn/python-网页爬虫-文本处理-科学计算-机器学习-数据挖掘 曾经因为NLTK的缘故开始学习Python,之后渐渐成为我工作中的第一辅助脚本语言,虽然 ...

  8. Python相关机器学习‘武器库’

    开始学习Python,之后渐渐成为我学习工作中的第一辅助脚本语言,虽然开发语言是Java,但平时的很多文本数据处理任务都交给了Python.这些年来,接触和使用了很多Python工具包,特别是在文本处 ...

  9. Python Tools for Machine Learning

    Python Tools for Machine Learning Python is one of the best programming languages out there, with an ...

随机推荐

  1. svn propset svn:ignore

    1 添加svn:ignore svn propset svn:ignore ".settings target .classpath .project element.iml" . ...

  2. java开源项目之IQQ学习记录之单例模式与log4j日志记录

    作者:sushengmiyan 本文地址:http://blog.csdn.net/sushengmiyan/article/details/18992741 打开IQQ项目,打开包iqq.app中的 ...

  3. UNIX环境高级编程——线程

    线程包含了表示进程内执行环境必需的信息,其中包括进程中标示线程的线程ID.一组寄存器值.栈.调度优先级和策略.信号屏蔽字.errno变量以及线程私有数据. 进程的所有信息对该进程的所有线程都是共享的, ...

  4. xpath技术解析xml以及案例模拟用户登录效果

    问题:当使用dom4j查询比较深的层次结构的节点(标签,属性,文本),比较麻烦!!! xpath就在此情况下产生了--主要是用于快速获取所需的[节点对象]. 在dom4j中如何使用xPath技术 1) ...

  5. javascript之BOM编程Screen(屏幕)对象

    这个对象属性相对比较简单.掌握四个方法即可. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" & ...

  6. PA 项目任务创建资源

    -- 创建资源 DECLARE p_project_id NUMBER := 155233; p_task_id NUMBER := 244639; p_resource_list_member_id ...

  7. Chipmunk碰撞回调短时间内重入的解决办法

    Chipmunk引擎中碰撞行为可能在细微处与一般认识略有不同. 比如碰撞回调方法可能会重入.不知道方法(函数)重入概念的童鞋可以自行谷哥或度娘. 第一次碰撞方法还未返回,第二次碰撞回调又被调用了.至于 ...

  8. C# 基于密码的身份验证报错问题System.Net.NetworkCredential

    今天碰到个很奇怪的问题,在用下面这段代码调试时获取身份验证时居然报错,更奇怪的是本地VS中调试正常而在虚机上调试就报错了 ClientCredentials clientCredentials = n ...

  9. 发布一个参考tornado的高性能c++网络库:libtnet

    libtnet是一个用c++编写的高性能网络库,它在设计上面主要参考tornado,为服务端网络编程提供简洁而高效的接口,非常易于使用. Echo Server void onConnEvent(co ...

  10. HTML5进阶(二)HBuilder实现软件自动升级

    HBuilder实现软件自动升级 前言 移动APP开发好后需要实现软件自动升级功能,经过一番搜索,发现HBuilder具有"App资源在线升级更新"的功能,遂研究之. 经过一番测试 ...