Skip to content

Memory leak question #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karloballa opened this issue Nov 11, 2020 · 4 comments
Closed

Memory leak question #70

karloballa opened this issue Nov 11, 2020 · 4 comments

Comments

@karloballa
Copy link

I have this simple (pointless) loop:

auto input = cppflow::tensor(inData, shape);
for (size_t i = 0; i < 50000; i++)
auto res = model(input);

It eats memory in every iteration. It seems that in every iteration it makes 2 additional allocations. I'm not sure where I'm wrong.

Thanks,

@karloballa
Copy link
Author

After about 20000 forward steps the net eats more than half GB of the heap.
Any opinions?

cppflow1
cppflow2

@serizba
Copy link
Owner

serizba commented Nov 24, 2020

Hi @karloballa,

As others have pointed (#69) there is a leak in the call operator. It may be the source of your problem. You can check the PR where there is a proposal to fix it. At the moment we are working to merge the changes.

Thanks

@shyney7
Copy link

shyney7 commented Jan 13, 2021

@karloballa this should be fixed since #69 was merged. At least into the cppflow2 branch. Can you confirm this and close this issue if its fixed?

@karloballa
Copy link
Author

It is ok now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants