Coder Social home page Coder Social logo

Unstable performance about cudart.jl HOT 4 CLOSED

juliaattic avatar juliaattic commented on June 21, 2024
Unstable performance

from cudart.jl.

Comments (4)

timholy avatar timholy commented on June 21, 2024

This is probably the exact same asynchronous/synchronous issue that explains #30---in other words, it's an artifact of how you're testing it.

from cudart.jl.

dfdx avatar dfdx commented on June 21, 2024

Indeed, adding device_synchronize() fixed differences in timings. However, I see that it also made computations on GPU 3 times slower:

# CPU 
 julia> @time for i=1:1000 gemm!('N', 'N', 1., A, Im, 0., A) end
   1.972331 seconds

# GPU
!julia> device_synchronize(); @time (for i=1:1000 CUBLAS.gemm!('N', 'N', 1., d_A, d_Im, 0., d_A) end; device_synchronize())
   5.733445 seconds (25.00 k allocations: 937.500 KB)

Is it something expected too?

from cudart.jl.

timholy avatar timholy commented on June 21, 2024

Yes. (Not necessarily the precise numerical factor, but the general slowdown.) You're inhibiting the GPU from getting started on the next job as resources get freed from the last one.

from cudart.jl.

dfdx avatar dfdx commented on June 21, 2024

That makes sense. Thank you!

from cudart.jl.

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.