Replies: 1 comment
-
Update: To reproduce the behavior the following steps are necessary
Result Environment: Without the delay of 1 second i get a constant inference time of 8ms. It seems like my GPU is going into sleep mode. How can i solve this problem? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm usign a Nvidia RTX A2000 for inference.
![grafik](https://user-images.githubusercontent.com/51398244/228233147-48160965-a40c-4cb2-ab2a-efafbcfd3041.png)
Every second one images is classified. (always the same image with only a single object)
I measerd the time of the
![grafik](https://user-images.githubusercontent.com/51398244/228234270-143797fe-0a02-4da9-a7ab-0d8ed5d697e8.png)
detect.py
:After 5 seconds (5 images) the execution time is stable at 95ms.
When i delete the following code the execution after 5s is stable at 55ms:
model.warmup(imgsz=(1 if pt else bs, 3, *imgsz))
When i directly return a empty result in the
non_max_suppression
function (without executing the rest of thenon_max_suppression
function), the execution after 5s is stable at 10ms:return [torch.zeros((0, 6), device=prediction.device)]
Why does the
warmup
function and thenon_max_suppression
function take so long?Beta Was this translation helpful? Give feedback.
All reactions