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

Device::poll with Maintain::Wait returns early and with an incorrect value when a 5-second timeout is reached #4589

Open
KSchmidAmilar opened this issue Oct 27, 2023 · 1 comment · May be fixed by #5012
Assignees
Labels
area: api Issues related to API surface area: correctness We're behaving incorrectly type: bug Something isn't working type: enhancement New feature or request

Comments

@KSchmidAmilar
Copy link

KSchmidAmilar commented Oct 27, 2023

We're using wgpu to do some computing tasks where individual compute passes will take more than CLEANUP_WAIT_MS. In the case of a long running compute pass, waiting on the submission index with a Maintain::Wait or Maintain::WaitForSubmissionIndex will return after the timeout is exceeded, even if the task is not complete. It will also return true indicating the queue is empty if there's nothing else in the queue.

This timeout should be configurable. If that's hard, in the meantime, if this timeout is reached, device::poll call should return false to indicate there is still an item in the queue. Regardless, this behavior should be documented.

@cwfitzgerald cwfitzgerald added type: bug Something isn't working type: enhancement New feature or request area: api Issues related to API surface area: correctness We're behaving incorrectly labels Oct 27, 2023
@cwfitzgerald
Copy link
Member

cwfitzgerald commented Oct 27, 2023

Seems like there are two issues here:

  • We should gracefully and correctly handle timeout failures
  • We should expose an optional timeout as part of the Wait/WaitForSubmissionIndex enum

If you're up for a PR, neither should be terribly difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface area: correctness We're behaving incorrectly type: bug Something isn't working type: enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants