GithubHelp home page GithubHelp logo

First run slow with CUDA about amgcl HOT 3 OPEN

kai-lan avatar kai-lan commented on July 17, 2024
First run slow with CUDA

from amgcl.

Comments (3)

ddemidov avatar ddemidov commented on July 17, 2024

That is a known issue/normal behavior. The first run is "warm up", when the driver does things like kernel compilation for your specific device, caching etc. The numbers in the tutorial are all from the second or later runs.

The "self" portion of the profile is anything that belongs to the outer item, but is not enclosed by any of the inner items. Here is a possible example:

prof.tic("outer");
foo(); // will be recorded as "outer.self"
prof.tic("inner");
bar();
prof.toc("inner");
prof.toc("outer");

from amgcl.

kai-lan avatar kai-lan commented on July 17, 2024

That is a known issue/normal behavior. The first run is "warm up", when the driver does things like kernel compilation for your specific device, caching etc. The numbers in the tutorial are all from the second or later runs.

The "self" portion of the profile is anything that belongs to the outer item, but is not enclosed by any of the inner items. Here is a possible example:

prof.tic("outer");
foo(); // will be recorded as "outer.self"
prof.tic("inner");
bar();
prof.toc("inner");
prof.toc("outer");

Thanks for your reply. I have a follow-up question. How to access the total runtime from the profiler? I want to use it as a return value for my method.

from amgcl.

ddemidov avatar ddemidov commented on July 17, 2024

profile.toc() returns time since the initiating tic, so you could use that. There is no method to get the total time across all iterations, so you could either accumulate it yourself, or possible make a PR with the functionality.

from amgcl.

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.