Skip to content
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

Space leak in getNodes or getFetch #227

Open
basvandijk opened this issue Dec 7, 2018 · 1 comment
Open

Space leak in getNodes or getFetch #227

basvandijk opened this issue Dec 7, 2018 · 1 comment

Comments

@basvandijk
Copy link
Contributor

In a production server we had a major space leak that I tracked down to our usage of tensorflow. Heavily simplified our code looked like:

runSession $ do
  addGraphDef g
  forever $ do
    ...
    output <- runWithFeeds [ feed inTens ... ] outTens
    ...

After changing the code to the following the space leak went away:

runSession $ do
  addGraphDef g
  ns <- build $ getNodes outTens
  fetch <- build $ getFetch outTens
  forever $ do
    ...
    output <- runFetchWithFeeds [ feed inTens ... ] ns fetch
    ...

Note that for this to build I did have to patch tensorflow to export runFetchWithFeeds.

So clearly build $ getNodes t and / or build $ getFetch t is leaking. Any idea why?

@blackgnezdo
Copy link
Contributor

@basvandijk if you happen to have a smallish test case I'll happily start with it rather than writing my own. If not - no sweat.

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

2 participants