GPU Accelerated Computing with Python
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
- If you are new to Python, the python.org website is an excellent source for getting started material.
- Read this blog post if you are unsure what CUDA or GPU Computing is all about.
- 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.
- Watch the first CUDA Python CUDACast:
- Install Anaconda Accelerate
- First install the free Anaconda package from this location.
- 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
- For documentation, see the Continuum website for these various topics:
- Browse through the following code examples:
- You can download the following IPython Notebooks and (after installing Anaconda Accelerate) execute them locally on your own system which has an NVIDIA GPU:
- 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:
- 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.
- 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.
相关文章
- [Python] Indexing An Array With Another Array with numpy
- 【python】正则表达式
- [Django] Get started with Django -- Install python and virtualenv
- 【python cookbook】【字符串与文本】14.字符串连接及合并
- Atitit web httphandler的实现 java python node.js c# net php 目录 1.1. Java 过滤器 servelet1 1.2. Python的
- 如何用Python进行数据分析,详细流程讲解!
- Python之多线程:python多线程设计之同时执行多个函数命令详细攻略
- Python之ffmpeg:利用python编程基于ffmpeg将m4a格式音频文件转为mp3格式文件
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Entry/Entry的Command)
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Menu的Command)
- Python之pandas:pandas中to_csv()、read_csv()函数的index、index_col(不将索引列写入)参数详解之详细攻略
- Python的IDE:基于Eclipse/MyEclipse软件的PyDev插件配置python的开发环境(不同python项目加载不同版本的python)—从而实现Python编程图文教程之详细攻略
- Python语言学习:利用python语言实现调用内部命令(python调用Shell脚本)—命令提示符cmd的几种方法
- 如何使用python创建股票的时间序列可视化分析?
- Python学习10:字符串和编码
- C++调用C++项目中的Python脚本中的函数和类。,在,工程,python
- python自动化测试学习-Python测试框架之unittest和pytest
- Python开发指南[1]之程序员计时小时钟(附源码)
- 开发报错记录解决(三):编译python出现“SyntaxError: Non-UTF-8 code starting with ‘xcc‘ in file D”的统一解决办法
- Python:T4组合数据类型(含答案)