You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I first use the MobileNet example (Source) of Tensorflow.js as an initial point. However, the example does not use the WebGPU backend of Tensorflow.js. So I modified the first few lines of index.js to use the WebGPU backend, as shown below:
Then, following the npm install and npm run watch, the example indeed runs and could perform the DNN inference.
However, when I watch the terminal output of Chrome, I see a warning that says
This device doesn't support timestamp-query extension. Start Chrome browser with flag --disable-dawn-features=disallow_unsafe_apis then try again. Or zero will shown for the kernel time when profiling mode is enabled. Using performance.now is not workable for webgpu since it doesn't support synchronously to read data from GPU.
Another example I tried is the performance benchmark between WebGPU and WebGL backend of Tensorflow.js in the official repo of Tensorflow.js. source
I use python3 -m http.server to run a HTTP server in the perf folder, and run the benchmark.
However, the generated result shows that Tensorflow.js cannot get the execution time when running benchmarks on WebGPU. Moreover, the support timestamp-query extension warning is also appeared in the terminal of the browser.
Execution environment of my experiments
I am using MacBook Pro M1 Max (with built-in GPU) + Google Chrome Canary (106.0.5205.0)
Efforts I have tried
To make the timestamp-query extension work, following the instructions in the warning, I tried
So please you guys give me a hint that I can enable this feature?
Provide the exact sequence of commands / steps that you executed before running into the problem
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered:
@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 tf.profile is not called. #6689 will resolve it.
To run webgpu, you may need to setup a https server instead of http server. Otherwise navigator.gpu will be null if the url is like http://ip-address:port/xxxx. Or use http://localhost:port/xxx in your local machine.
Currently, on MacOS, profile is not well supported. So you may can't see the individual op execution time using gpu timestamp query API in benchmarks. But the avg model execution time using 'peformance.now' is still correct.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
System information
Description
Hi guys!
I am studying to use Tensorflow.js to run DNN in the Web browser with WebGPU feature.
Example #1
So, I first use the
MobileNet
example (Source) of Tensorflow.js as an initial point. However, the example does not use the WebGPU backend of Tensorflow.js. So I modified the first few lines ofindex.js
to use the WebGPU backend, as shown below:Then, following the
npm install
andnpm run watch
, the example indeed runs and could perform the DNN inference.However, when I watch the terminal output of Chrome, I see a warning that says
Example #2
Another example I tried is the performance benchmark between WebGPU and WebGL backend of Tensorflow.js in the official repo of Tensorflow.js. source
I use
python3 -m http.server
to run a HTTP server in theperf
folder, and run the benchmark.However, the generated result shows that Tensorflow.js cannot get the execution time when running benchmarks on WebGPU. Moreover, the
support timestamp-query extension
warning is also appeared in the terminal of the browser.Execution environment of my experiments
I am using MacBook Pro M1 Max (with built-in GPU) + Google Chrome Canary (106.0.5205.0)
Efforts I have tried
To make the
timestamp-query extension
work, following the instructions in the warning, I triedHowever, this trick does not take any efforts.
So please you guys give me a hint that I can enable this feature?
Provide the exact sequence of commands / steps that you executed before running into the problem
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: