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

Timestamp query resets #4069

Closed
kainino0x opened this issue Apr 26, 2023 · 4 comments · Fixed by #4135
Closed

Timestamp query resets #4069

kainino0x opened this issue Apr 26, 2023 · 4 comments · Fixed by #4135
Labels
copyediting Pure editorial stuff (copyediting, bikeshed, etc.)
Milestone

Comments

@kainino0x
Copy link
Contributor

kainino0x commented Apr 26, 2023

I'm migrating this from an inline issue:

Note: The timestamp values may be zero if the physical device reset timestamp counter, please ignore it and the following values.

Issue: Write normative text about timestamp value resets.

I do not know what needs to be written here. More detail from #614 which I assume is about the same thing:

Compute the difference of the two timestamp queries. The time delta may be negative due to the timestamp counter may be reset after a long time on some platforms. We can suggest users to skip the invalid time delta if it’s negative.

Regardless since this is defined in the V1 spec (even though implementations may ship without it, as Chrome does), marking as V1.

@kainino0x kainino0x added this to the V1.0 milestone Apr 26, 2023
@kainino0x
Copy link
Contributor Author

@haoxli do you know what needs to be added here?

@kainino0x
Copy link
Contributor Author

Thread where I requested this inline issue be added: #771 (comment)

@haoxli
Copy link
Contributor

haoxli commented May 19, 2023

Sorry for my late reply, I missed this notification.

On Nivdia/AMD GPUs, their GPU timestamps from query API are nanoseconds since POSIX time (also known as Epoch time, Unix time), timestamps have always been positive growth.

To my knowledge, timestamp query resets will happen on Intel GPUs, its GPU counter restart from a big number every few hours. So we have to make user aware that we should skip and do not compare the timestamp values if any timestamp is less than the previous one.

On Apple GPUs, the GPU counter is similar to Intel GPUs, but its timestamps are much bigger than the values on Intel and Nividia GPUs. I'm not sure what will happen if the counter reaches the maximum limitation (may never reach if the counter is large enough).

Note: The timestamp values may be zero ....

This is out of date. We don't need to make the timestamps to be 0s when timestamp query resets, which will complicate the implementation of the compute shader for timestamp conversion. Talked with Corentin in sync meeting before, just notice users to take care of the timestamps which may be reset.

toji added a commit that referenced this issue May 24, 2023
Fixes #4069

Removes the reference to timestamps being zeroed out and instead
encourages developers to be aware of occasional nonsensical values.
@kainino0x kainino0x added the copyediting Pure editorial stuff (copyediting, bikeshed, etc.) label May 24, 2023
@kainino0x
Copy link
Contributor Author

Resolved in 2023-05-24 meeting: just describe in the spec when/how timestamp resets can occur, don't try to guarantee anything more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copyediting Pure editorial stuff (copyediting, bikeshed, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants