-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
WebGPU readSync is only available for CPU-resident tensors. #7274
Comments
@lebron8dong Can you help to give an accessible case so that we can reproduce and debug this issue? |
https://codelabs.developers.google.com/codelabs/tfjs-training-classfication?hl=zh-cn#0 This is the official example, I reproduced the model, but reported the error when using webgpu as the backend. I used cpu and webgl to train the model respectively, but when I used webgpu to load the model, both reported the same error:WebGPU readSync is only available for CPU-resident tensors. |
Can you directly share the complete webgpu case code so that I can try it locally? Or a very small case to reproduce your issue? |
|
@qjia7 source of error:
} |
@lebron8dong Thanks for your information. I can reproduce it now. The main problem is that webgpu itself doesn't support synchronous read. However, there are still several places using |
@qjia7 |
Fix: #7274 Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
@qjia7 There is still the same error in my demo. Does my demo code need to be changed? |
You need to wait for the next release of tfjs-vis. Or build it by yourself from the source code https://github.com/tensorflow/tfjs/tree/master/tfjs-vis. I tried it locally. The next issue you may meet is platform.isTypedArray is not a function. After some workarounds to void #7273, it works on webgpu. |
@qjia7 thank you very much,thank you very much. |
@qjia7 |
@lebron8dong WebGPU only supports async read. Maybe try |
I trained a model on the browser and used webgpu to load the model and reported an error:I trained a model on the browser and used webgpu to load the model and reported an error
The text was updated successfully, but these errors were encountered: