官术网_书友最值得收藏!

Summary

Setting up your Python environment for GPU programming can be a very delicate process. The Anaconda Python 2.7 distribution is suggested for both Windows and Linux users for the purposes of this text. First, we should ensure that we have the correct hardware for GPU programming; generally speaking, a 64-bit Windows or Linux PC with 4 gigabytes of RAM and any entry-level NVIDIA GPU from 2016 or later will be sufficient for our ends. Windows users should be careful in using a version of Visual Studio that works well with both the CUDA Toolkit and Anaconda (such as VS 2015), while Linux users should be particularly careful in the installation of their GPU drivers, and set up the appropriate environment variables in their .bashrc file. Furthermore, Windows users should create an appropriate launch script that will set up their environment for GPU programming and should use a pre-compiled wheel file for the installation of the PyCUDA library.

Now, with our programming environment set up and in place, we will spend the next chapter learning the very basics of GPU programming. We will see how to write and read data to and from the GPU's memory, and how to write some very simple elementwise GPU functions in CUDA C. (If you have seen the classic 1980's film The Karate Kid, then you might think of the following chapter as the "wax on, wax off" of GPU programming.)

主站蜘蛛池模板: 苗栗县| 黄大仙区| 安岳县| 航空| 永善县| 乐至县| 邢台市| 鄂温| 深州市| 凤冈县| 休宁县| 常州市| 土默特右旗| 清河县| 义乌市| 灵山县| 庆城县| 徐州市| 嘉兴市| 中江县| 聂荣县| 景宁| 盖州市| 荔浦县| 巍山| 三都| 霍州市| 保定市| 饶平县| 靖江市| 尚志市| 岢岚县| 盐津县| 双鸭山市| 镶黄旗| 楚雄市| 隆回县| 湖口县| 曲周县| 哈巴河县| 千阳县|