Skip to content
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

Do not capture timing if there is no work to time. #564

Closed
ptheywood opened this issue Jun 21, 2021 · 1 comment · Fixed by #640
Closed

Do not capture timing if there is no work to time. #564

ptheywood opened this issue Jun 21, 2021 · 1 comment · Fixed by #640

Comments

@ptheywood
Copy link
Member

Cuda event timers are used to collect timing information for the various sections of a simulation (init functions, step tim, step functions, exit functions).

Although very cheap, these timers do have a cost (~12us according to nsys to create 2 events, record 2 events, stop 2 events, and syncrhonise them / get the elapsed time).

In cases where there is nothing to do (i.e. if there are no exit functions) then there is no point in timing the exit functions.

For input and exit, this won't help much, but for per-iteratiion recording of step functions if there are none then this might add up to something measurable eventually.

Super low priority as low cost, but would be a very minor efficiency improvement.

@ptheywood ptheywood added this to the Post Release Optimisations milestone Jun 28, 2021
@ptheywood ptheywood modified the milestones: Post Release Optimisations, v2.0.0-alpha.N Aug 11, 2021
@ptheywood
Copy link
Member Author

Currently Step functions are not timed independently of the step itself.

As of #640, RTC, init and exit timers will be steady clock timers, with CUDAEvent timers being used just for the total simulation timer and per iteration time. I don't believe it's possible to have a CUDASimulation which would not contain atleast one function as a part of a step, so I'm going to close this issue.

It was never going to be a significant change either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant