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

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!

主站蜘蛛池模板: 高台县| 卢龙县| 达日县| 辽阳市| 正镶白旗| 蓬安县| 开化县| 禄丰县| 甘肃省| 永泰县| 天津市| 阳东县| 铜鼓县| 扎兰屯市| 临江市| 昭平县| 青冈县| 马关县| 通道| 辽阳县| 调兵山市| 广昌县| 怀安县| 南陵县| 遵义县| 海林市| 鹤山市| 泌阳县| 丹凤县| 平顶山市| 富川| 英超| 共和县| 辽中县| 鹤岗市| 大石桥市| 崇明县| 鹤壁市| 株洲县| 大新县| 福建省|