-
Notifications
You must be signed in to change notification settings - Fork 119
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
First run slow with CUDA #262
Comments
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. |
|
I am using CUDA backend. In the code, I have pretty much the same setting as the Poisson tutorial. And I tested on the same examples: https://sparse.tamu.edu/FEMLAB/poisson3Db. I set up profiler that times the setup time and solve time. However, setup is very slow for the first run and is fast from then on. Solve time is consistent all the time.
But in the Poisson tutorial, the profiled time is always consistent.
Also, what is
self
is profiler?First time:
From then on:
The text was updated successfully, but these errors were encountered: