webgpu: fix: conditionally call deprecated GPUAdapter.requestAdapterInfo#8392
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
|
/gcbrun |
|
I'm seeing this error in the build: Maybe our WebGPU types from NPM are out of date? Does |
|
@mattsoulanille Thank you for reviewing, yeah – I'm seeing that too with the previous commit. Oudated WebGPU types was it! The latest commit fixes the error. It keeps the |
|
/gcbrun |
|
Thanks! The |
mattsoulanille
left a comment
There was a problem hiding this comment.
Looks like the linter isn't happy with any.
Head branch was pushed to by a user without write access
15d292c to
b243896
Compare
|
@mattsoulanille Sorry for the back-and-forth, could've sworn |
|
No worries! Our build and test scripts are not particularly easy to use (sorry). There's a |
|
/gcbrun |
|
/gcbrun |
Context
GPUAdapter.requestAdapterInfois deprecated and non-standard.It's in use by
tfjs-backend-webgpu, but the result is optional, and only used for a single optimization. Yet if called in an environment which doesn't support it, it will throw.By checking the feature's available before calling it, this unbreaks Deno runtime support for
tfjs-backend-webgpu, which doesn't support this feature and throws.Testing/Verification
yarn testandyarn lintsucceed. Verified basic example now works in Deno.Related
denoland/deno#22029