Jiajia Qin
Jiajia Qin
Some initial opinions for this PR. Currently, the `GPUData` returned from `dataToGPU` is as below: ``` export interface GPUData { tensorRef: Tensor; texture?: WebGLTexture; buffer?: GPUBuffer; texShape?: [number, number]; bufSize?:...
@xhcao implemented webgpu's `dataToGPU`. Can you take a look and give an example based on Na's demo for webgpu?
> This PR is still WIP. @qjia7 @xhcao PTAL to see if you have any high-level comments. Do you have a good idea to write some test cases for this?...
@liborui WebGPU should work with `./Google Chrome Canary --enable-unsafe-webgpu`. The warning message `This device doesn't support timestamp-query extension. ...` is only related with profiling mode. We shouldn't print it if...
@vladmandic Does `dataToGPU` satisfy your requirement? Currently, both webgl and webgpu support `dataToGPU` which directly exposes the underlying GPU resources (texture for webgl, buffer for webgpu). You can do any...
Personally, I think [`toPixels`](https://github.com/tensorflow/tfjs/blob/master/tfjs-core/src/ops/browser.ts#L302)'s interface `async function toPixels(img: Tensor2D|Tensor3D|TensorLike, canvas?: HTMLCanvasElement): Promise` is problematic, which requires it must return a `Uint8ClampedArray`. That means it's unavoidable to download data from gpu...
@vladmandic I ever wrote a [PR](https://github.com/tensorflow/tfjs/pull/5914) to optimize toPixels. After some internal discussions, `dataToGPU` is a more powerful interface for users. So I suspended that work. It seems that it's...
fyi @pyu10055 @lina128 @jinjingforever
FYI, https://github.com/tensorflow/tfjs/pull/6603 use the simulated matmul_vec4 on webgpu can greatly improve the performance of `Conv2DBackpropInput`.
cc @pyu10055 @lina128 @jinjingforever