-
-
Notifications
You must be signed in to change notification settings - Fork 36
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.queue.read_buffer times out #650
Comments
Hi Ahmed, thanks for this issue! Ah, when I added the timeout, I thought it was as good idea in case for some reason wgpu-native did not fulfill the promise. I figured 5 s is plenty of time, but I had not considered it could simply be waiting for computations 🤦 I think it makes sense to remove the timeout altogether. Probably should get #631 merged first, because it touches the same code. |
cc @fyellin |
Thank you for the response @almarklein, once the timeout is removed, we'll bump the version back to latest. |
This is something we we struggle with too. I've never used async frameworks but do they "raise errors" or just "die silently"? |
@almarklein thank you for fixing it! Do you have an eta for this to ship? |
Raise errors. |
Longer answer: Co-routines by themselves can die silently. Something has to take responsibility for checking whether they failed and take appropriate action. From what I understand one of the main points of Trio is to force you to write code that does this. Asyncio detects when a task raises an exception without anyone checking, and will raise an exception if that happens with |
Probably tomorrow. |
Describe the bug
device.queue.read_buffer
times outTo Reproduce
Output:
Observed behavior
When running tinygrad stable_diffusion.py, the buffer read times out when trying to get the output of the decode step. But it is not the buffer reading that takes that long, but to actually run the compute. Manually increasing the timeout from 5.0s here solves it, but in
0.18.1
this just worked (the timeout wasn't there?). Now, we have stable diffusion working on faster machines, but on my local computer, it times out, so I have to manually increase this timeout value, so for now we downgraded to0.18.1
.Can this timeout be increased/disabled?
Your environment
OS: MacOS Sonoma 14.4.1
Python version: 3.12
wgpu-py version: >=0.19.0
wgpu backend: Metal
The text was updated successfully, but these errors were encountered: