필터 지우기
필터 지우기

why cpu faster than gpu?

조회 수: 2 (최근 30일)
Hu Keting
Hu Keting 2022년 9월 7일
답변: Vidip Jain 2023년 2월 20일
My matlab version is 2022a. I ran the DDPG of 'SimplePendulumWithImage-Continuous' for 50 epidodes with
criticOptions.UseDevice = 'cpu';actorOptions.UseDevice = 'cpu';
and
criticOptions.UseDevice = 'gpu';actorOptions.UseDevice = 'gpu';
Surprisingly, it took 712 seconds for cpu and 1202 seconds for gpu. How did this happen?
The cpu is R5800H and the gpu is 3070 max-q.
  댓글 수: 3
Hu Keting
Hu Keting 2022년 9월 13일
Yes. The power limit of CPU is 45w while the GPU is 140W.
Joss Knight
Joss Knight 2022년 9월 14일
We're looking into it. It may be that this example isn't complex enough to get a benefit from the GPU.

댓글을 달려면 로그인하십시오.

답변 (1개)

Vidip Jain
Vidip Jain 2023년 2월 20일
In the case of the DDPG algorithm for the 'SimplePendulumWithImage-Continuous' environment, the performance may be influenced by the size and complexity of the model, the number of episodes, and the batch size used during training. It is possible that the CPU in your system is better suited for this specific task than the GPU. This can happen if the GPU is not fully utilized during training due to factors such as small batch size or insufficient parallelization. In such cases, the CPU may perform better because it is optimized for sequential operations and can better utilize the available resources for this specific task.

카테고리

Help CenterFile Exchange에서 Parallel and Cloud에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by