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: remove custom size parameter of dataToGPU #6393
Conversation
@qjia7 @haoyunfeix @axinging @gyagp, please take a look, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Add @lina128 to take another look.
@@ -381,6 +378,9 @@ export class Tensor<R extends Rank = Rank> { | |||
* For WebGL backend, the data will be stored on a densely packed texture. | |||
* This means that the texture will use the RGBA channels to store value. | |||
* | |||
* For WebGPU backend, the data will be stored on a buffer. There is no | |||
* parameter, so can not use an user defined size to create the buffer. | |||
* | |||
* @param options: | |||
* For WebGL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lina128 Do you know why this part of description is not presented in https://js.tensorflow.org/api/latest/#tf.Tensor.dataToGPU Returns: GPUData
? Is there a bug here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @lina128 , Please take a look, especially review the issue asked by Jiajia, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @qjia7)
tfjs-core/src/tensor.ts
line 385 at r2 (raw file):
https://js.tensorflow.org/api/latest/#tf.Tensor.dataToGPU
Good catch! I just realized the returns field is not captured at all, not just this one. We'll fix it. Thank you!
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is