Giter Site home page Giter Site logo

Comments (5)

ostrosablin avatar ostrosablin commented on July 22, 2024

Judging by your description, that sounds like kernel-mode memory leak, since keeping allocated memory after process ending would be not safe and would open the vector to perform DoS attack.

It could be, for instance, a faulty driver allocating excess memory and not freeing it up. Try using

sudo slabtop

It should give info on kernel-mode memory usage. It should not normally take up more than several hundreds of MBs (my machine keeps 200). If it takes a GB or more, there must be something bad going in kernel-space (nvidia drivers leak kernel memory?).

from torch-rnn.

buckohfive avatar buckohfive commented on July 22, 2024

Interesting. The total space used under slabtop isn't much (~150MB) but running the sample.lua repeatedly caused hundreds of thousands of kmalloc-32 objects to be allocated and not destroyed (right now, my dev box has 1.47M kmalloc-32 objects).

from torch-rnn.

buckohfive avatar buckohfive commented on July 22, 2024

Further testing. I can cause this memory leak to occur using either char-rnn or torch-rnn. Using keras (Theano), I don't get the same issue with similar networks.

I also note that the memory leak is consistent - 110 objects (ish - sometimes 111, sometimes 109) of 128 bytes each, regardless of network size.

Weird. I'm not sure how to proceed from here.

from torch-rnn.

buckohfive avatar buckohfive commented on July 22, 2024

This is a cutorch error most likely. In sample.lua, if i halt execution error() after "require 'cutorch'", I can cause the memory leak. Before "require 'cutorch'", no leak.

I'll close this issue. It isn't torch-rnn :)

from torch-rnn.

buckohfive avatar buckohfive commented on July 22, 2024

I put this over in cutorch, FYI: torch/cutorch#379

from torch-rnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.