Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use GPU for PARL training in AI Studio

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use GPU for PARL training in AI Studio. I think it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.

1. Preparation article

PARL is based on the paddlepaddle framework, and since paddlepaddle has different installation packages for cuda9 and cuda10, check the cuda version in AI Studio first.

Open any project in AI Studio and check the cuda version in the terminal

It is found that Cuda is version 9.2. Check the cuDNN version again

It is found that the version of cuDNN is 7.3.1.

According to the instructions in the PP official installation documentation, (https://www.paddlepaddle.org.cn/install/quick)

It is concluded that we should use the pp gpu version of the CUDA 9 series, even if you install it with the following command

Python3-m pip install paddlepaddle-gpu==1.6.3.post97-I https://mirror.baidu.com/pypi/simple

Note that to choose the post97 version, do not use post107

two。 Operation section

To enter notebook, first install the GPU version of paddle, for example:

Note that the red box above is a key step.

Then just write the code normally. However, if you still doubt whether GPU is working or not, you can modify Agent and take a look at the print runtime environment to boost confidence. For example:

Notice the code I added in the red box above. You can see the actual environment in the log at run time, as follows:

At this point, we can be sure that GPU is really running.

The above is how to use GPU for PARL training in AI Studio. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report