- 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!
- Linux運維之道(第3版)
- Learning OpenDaylight
- Linux實戰
- UNIX操作系統設計
- 開源安全運維平臺OSSIM疑難解析:入門篇
- 計算機系統開發與優化實戰
- Linux操作系統應用編程
- Windows Server 2012網絡操作系統企業應用案例詳解
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理
- Windows 7實戰從入門到精通
- Building Telephony Systems With Asterisk
- UI設計手繪表現從入門到精通
- Mastering Windows 8 C++ App Development
- Windows Server 2008組網技術與實訓(第3版)
- 大學計算機應用基礎實踐教程(Windows 7+MS Office 2010)