为什么我的 Jetson 图像处理性能不及 RTX 3060?

您好,本人在 Jetson AGX Orin 32GB 和 RTX 3060 运行了相同的代码,内容如下:

import cupy
import cv2
import cupyx.scipy.ndimage as ndi
import numpy as np
import time

img = cv2.imread(‘test.jpg’)
img_gpu = np.asarray(img, np.float32)
img_gpu = cupy.array(img_gpu)

start_time = time.time()
dst_gpu = ndi.median_filter(img_gpu, size=3)
gpu_time = time.time() - start_time

start_time = time.time()
dst_cpu = cv2.medianBlur(img, ksize=3)
cpu_time = time.time() - start_time

print(‘GPU median filter time:’, gpu_time)
print(‘CPU median filter time:’, cpu_time)

但是, Jetson 的处理耗时远高于 RTX 3060 的耗时。

下图为 Jetson 的运算耗时:
image

下图为 RTX 3060 的运算耗时:
image

由图可知,无论是CPU还是GPU的耗时,RTX3060反而比Jetson还要快。

以上想请教下官方,是否存在本人对Jetson的配置问题?比如需要手动开启 Jetson 处理加速?还是需要有什么其他额外需要配置的地方么?

You can try to set your device into the MAXN mode before running the test

On the Orin device, rebooting is required when setting a different power mode.
However, there is an interactive checker to confirm the rebooting process which might make the script look like frozen.

To manually set the MAXN mode can avoid the issue.
Please give it a check to see if this works for your problem.

$ sudo nvpmodel -m 0
NVPM WARN: Golden image context is already created
NVPM WARN: Reboot required for changing to this power mode: 0
NVPM WARN: DO YOU WANT TO REBOOT NOW? enter YES/yes to confirm:

Thanks.

您好,我目前已经是最大功率了。除此之外还有什么可以调整的地方么?

Hi,

Your test sample is fp32. Based on the fp32 spec, the output is expected.

RTX 3060 spec: 13 shader-TFLOPs

Orin spec: up to 5.3 FP32 TFLOPs

But when you benchmark, running it with a loop and taking average elapsed time is better.
Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.