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

Handle's Kernel timing API is awkward and error-prone to use. #2736

Open
amberhassaan opened this issue Feb 8, 2024 · 3 comments
Open

Handle's Kernel timing API is awkward and error-prone to use. #2736

amberhassaan opened this issue Feb 8, 2024 · 3 comments
Assignees

Comments

@amberhassaan
Copy link
Contributor

Root of the awkwardness is that there is no field for accumulated kernel time in the Handle. Calling Run() automatically captures the kernel invocation time, but overwrites what was there. This means, the user has to often save the previous accumulated time, then run a kernel and then call AccumKernelTime() to accumulate kernel times.

This needs to be straightened out by adding a field for accumulated time so that the user does not have to worry about this careful orchestration.

Proposal: Add new field for accumulated time where time is accumulated automatically after each Run() call. GetKernelTime() now is replaced by GetLaskKernelTime() and GetAccumulatedKernelTime(). Also, ResetKernelTime() resets both the fields or just resetting the accumulated time field should be enough.

@atamazov
Copy link
Contributor

[Informative] How to use old awkward API: #2429 (comment)

@JehandadKhan
Copy link
Contributor

JehandadKhan commented Feb 27, 2024 via email

@amberhassaan
Copy link
Contributor Author

My goal was to fix this awkwardness instead of documenting it.

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

No branches or pull requests

3 participants