Giter Site home page Giter Site logo

Comments (14)

soumith avatar soumith commented on May 22, 2024

while i really want to see this as well, there's no easy way to do this, afaik. if someone knows how to measure GPU memory consumed exactly (other than running nvidia-smi at the exact time and hoping to catch a glimpse), i'd love to know.

from convnet-benchmarks.

cancan101 avatar cancan101 commented on May 22, 2024

Theano has theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info():
(https://github.com/Theano/Theano/blob/master/theano/sandbox/cuda/cuda_ndarray.cu#L3418)

I am not sure about the other frameworks. Also you have to make that function call.

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

right the Cuda API has cudaMemGetInfo, but the problem is that you dont know the peak memory usage while the kernels are running, you only get the mem usage before and after (or by chance in between, if the call itself is asynchronous and the timing is just right).

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

the functions that launch the kernels might have mallocs and frees before and after launching the kernel, we would want to be first-party to the mallocs before the frees happen.

from convnet-benchmarks.

nouiz avatar nouiz commented on May 22, 2024

This can be run only between theano fct call. So you won't know the peak.

I see 2 ways to do this:

  1. give the formula for the extra memory requested for the gpu.
  2. run experiments bigger and bigger until it crash with missing memory.
    Then you compare the biggest one that was working.

On Thu, Jul 31, 2014 at 1:31 PM, Alex Rothberg [email protected]
wrote:

Theano has theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info():
(
https://github.com/Theano/Theano/blob/master/theano/sandbox/cuda/cuda_ndarray.cu#L3418
)

I am not sure about the other frameworks. Also you have to make that
function call.

β€”
Reply to this email directly or view it on GitHub
#9 (comment)
.

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

i like @nouiz 's formula approach, we can calculate it from the method used.

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

@nouiz I can add the formulae, could you help out in adding time benchmarks for the backprop calls for Theano, i have finished backprop numbers for all the others.

from convnet-benchmarks.

nouiz avatar nouiz commented on May 22, 2024

I'm pretty buzy, I don't know when I can do it. What do you need exactly, a
benchmark with the full forward/backward or just the backward? Is there an
example I can follow?

On Thu, Jul 31, 2014 at 1:50 PM, Soumith Chintala [email protected]
wrote:

@nouiz https://github.com/nouiz I can add the formulae, could you help
out in adding time benchmarks for the backprop calls for Theano, i have
finished backprop numbers for all the others.

β€”
Reply to this email directly or view it on GitHub
#9 (comment)
.

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

What do you need exactly, a benchmark with the full forward/backward or just the backward?

Adding backward timings to the current benchmark is what I'm looking for:
https://github.com/soumith/convnet-benchmarks/blob/master/theano/pylearn2_benchmark.py

from convnet-benchmarks.

nicholas-leonard avatar nicholas-leonard commented on May 22, 2024

Okay so you want one timing for the entirety of the forward/backward.

from convnet-benchmarks.

nicholas-leonard avatar nicholas-leonard commented on May 22, 2024

Oh, an just so we are clear, does this includes an inplace parameter update? (in torch, backward or backwardUpdate vs just updateGradInput).

from convnet-benchmarks.

soumith avatar soumith commented on May 22, 2024

Okay so you want one timing for the entirety of the forward/backward.

Correct.

Oh, an just so we are clear, does this includes an inplace parameter update?

backward (so updateGradInput + accGradParameters)

Thanks nick!

from convnet-benchmarks.

nicholas-leonard avatar nicholas-leonard commented on May 22, 2024

French:
Ok donc Fred ce sera benchmark qui inclu le forward, ainsi qu'un update des parametres utilisant les gradient. Et le update peut Γͺtre fait inplace.

from convnet-benchmarks.

nicholas-leonard avatar nicholas-leonard commented on May 22, 2024

Okay so the theano backward is complete: #11 @f0k.

from convnet-benchmarks.

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.