- Hands-On GPU Programming with Python and CUDA
- Dr. Brian Tuomanen
- 164字
- 2021-06-10 19:25:38
Testing PyCUDA
Finally, we're at the point where we can see whether our GPU programming environment actually works. We will run a small program from the next chapter that will query our GPU and yield some relevant information about the model number, memory, number of cores, architecture, and so forth. Get the Python file (deviceQuery.py) from directory 3 in the repository, which is also available at https://github.com/PacktPublishing/Hands-On-GPU-Programming-with-Python-and-CUDA/blob/master/3/deviceQuery.py.
If you are using Windows, be sure to launch the GPU programming environment by launching the .bat file on our desktop we made in the last section. Otherwise, if you are using Linux, open a bash Terminal. Now type the following line and press Enter—python deviceQuery.py.
This will output many lines of data, but the first few lines should indicate that your GPU has been detected by PyCUDA, and you should see the model number in the following line:
Congratulations, you are now ready to embark upon the world of GPU programming!
- Kubernetes修煉手冊
- Linux系統文件安全實戰全攻略
- Linux系統架構與運維實戰
- Modern Web Testing with TestCafe
- Linux網絡操作系統與實訓(第三版)
- Installing and Configuring Windows 10:70-698 Exam Guide
- 高性能Linux服務器構建實戰:系統安全、故障排查、自動化運維與集群架構
- 奔跑吧 Linux內核(入門篇)
- Kubernetes從入門到實踐
- Dreamweaver CS5.5 Mobile and Web Development with HTML5,CSS3,and jQuery
- 分布式高可用架構之道
- 嵌入式微系統
- 辦公自動化教程(Windows7+Office2010)
- SQL Server on Azure Virtual Machines
- Windows 10從入門到精通