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

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!

主站蜘蛛池模板: 嫩江县| 乐清市| 赣州市| 宜兰市| 三原县| 惠州市| 农安县| 宝鸡市| 临颍县| 石林| 新昌县| 罗江县| 尚志市| 桂林市| 班玛县| 德昌县| 永清县| 大石桥市| 临高县| 揭阳市| 彝良县| 深泽县| 杭锦旗| 新营市| 阿合奇县| 剑川县| 南川市| 连平县| 淄博市| 讷河市| 克什克腾旗| 江津市| 唐河县| 平遥县| 定安县| 铁岭市| 府谷县| 宁阳县| 木兰县| 昭通市| 南康市|