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

Setting Up Your GPU Programming Environment

We will now see how to set up an appropriate environment for GPU programming under both Windows and Linux. In both cases, there are several steps we will have to take. We will proceed through these steps one-by-one, noting any differences between Linux and Windows as we proceed. You should, of course, feel free to skip or ignore any sections or comments that don't apply to your choice of operating system.

The reader should note that we will only cover two platforms for 64-bit Intel/AMD-based PCs in this chapter—Ubuntu LTS (long-term support) releases and Windows 10. Note that any Ubuntu LTS-based Linux operating systems (such as Xubuntu, Kubuntu, or Linux Mint) are also equally appropriate to the generic Unity/GNOME-based Ubuntu releases.

We suggest the use of Python 2.7 over Python 3.x. Python 2.7 has stable support across all libraries that we use in this text, and we have tested every example given in this book with Python 2.7 on both Windows and Linux platforms. Python 3.x users can make use of this book, but should be aware of the differences between Python 2.7 and Python 3.x. Some of the examples in this have been tested on using Python 3.7, but require standard changes, such as adding parentheses with the Python print function. 

Packt author Dr. Sebastian Raschka provides a list of key differences between Python 2.7 and 3.x at  https://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html.

We suggest the Anaconda Python 2.7 distribution in particular for both Windows and Linux users, since this can be installed on a user-by-user basis without sudo or administrator access, contains all necessary data science and visualization modules needed for this text, and uses fast pre-optimized NumPy/SciPy packages that make use of Intel's Math Kernel Library (MKL). (The default Linux /usr/bin/python installation should also be sufficient for this text, but you may have to install some packages manually, such as NumPy and Matplotlib.) 

Anaconda Python (both 2.7 and 3.x versions) can be downloaded for all platforms at  https://www.anaconda.com/download/.

Users who are on other supported platforms (for example, macOS, Windows 7/8, Windows Server 2016, Red Hat/Fedora, OpenSUSE, and CENTOS) should consult the official NVIDIA CUDA documentation (https://docs.nvidia.com/cuda/) for further details. Furthermore, there are other possibilities for hardware: the reader interested in embedded systems or robotics with some experience in boards, such as the Raspberry Pi may wish to start with an ARM-based NVIDIA Jetson development board, while the reader interested in cloud computing or web programming may consider remotely using an appropriate Azure or AWS instance. In these cases, the reader is encouraged to read the official documentation to set up their drivers, compiler, and CUDA Toolkit. Some of the steps in this chapter may or may not apply.

The learning outcomes for this chapter are:

  • Ensuring that we have the appropriate hardware
  • Installing the NVIDIA GPU drivers
  • Setting up an appropriate C/C++ programming environment
  • Installing the NVIDIA CUDA Toolkit
  • Setting up our Python environment for GPU programming
主站蜘蛛池模板: 交城县| 吉水县| 合水县| 长葛市| 宜都市| 射洪县| 建始县| 高雄市| 舒城县| 恩施市| 泌阳县| 城口县| 台东市| 汉中市| 南华县| 同德县| 岗巴县| 马尔康县| 建湖县| 张家川| 海南省| 施甸县| 五台县| 城固县| 乐亭县| 仙游县| 上林县| 五大连池市| 遵义市| 长兴县| 平乡县| 兴文县| 阿拉善左旗| 子洲县| 同江市| 剑河县| 临猗县| 平顺县| 渭南市| 得荣县| 油尖旺区|