sru icon indicating copy to clipboard operation
sru copied to clipboard

Inference memory leak?

Open lxsyz opened this issue 2 years ago • 3 comments

Hello When I use the sru model under the dev-3.0 branch for inference, I find that the memory keeps growing, is it because of memory leaks? The code is simple

sru_left,_ = self.sru_left(input_left)
sru_right,_ = self.sru_right(input_right)

And I use memory_profiler to detect memory. The following code will result in a larger memory growth. h, c = rnn(prevx, c0_[i], mask_pad=mask_pad)

Can you help me?

lxsyz avatar Jun 09 '22 06:06 lxsyz

Your code doesn't report any errors?

wangxiao-star avatar Jun 09 '22 07:06 wangxiao-star

Your code doesn't report any errors?

No errors, and I run my code in cpu. Torch 1.6.0. I have also tried lstm model, it seems that if I call the model all the time, memory will grow over time.

lxsyz avatar Jun 10 '22 02:06 lxsyz

你没有用GPU跑吗?

wangxiao-star avatar Jun 10 '22 14:06 wangxiao-star