Skip to content
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

Missing TypeScript Type Declaration #677

Closed
egalli opened this issue May 3, 2024 · 6 comments
Closed

Missing TypeScript Type Declaration #677

egalli opened this issue May 3, 2024 · 6 comments
Labels

Comments

@egalli
Copy link

egalli commented May 3, 2024

In order to be able to use WebNN from TypeScript, WebNN needs a .d.ts type declaration file.

WebGPU uses a set scripts and manual changes under https://github.com/gpuweb/types/. This repository gets published under @webgpu/types.

I propose that we create a similar repository for WebNN. I have created a starting point
on https://github.com/egalli/webnn-types-example/ that WebNN could adopt under the webmachinelearning org. The webnn-types-example project is based on the WebGPU repository plus a few changes to make it compatible with newer versions of TypeScript and some oddities in the tsc compiler.

@anssiko
Copy link
Member

anssiko commented May 8, 2024

@egalli, thanks for this proposal, looks very useful and relevant. I will bring this to our upcoming meeting for discussion.

I assume you'd be willing to contribute your starting point to the group. The likely home would be the WebML CG that is chartered to take on this type of work. I also assume you'd be in a position to join the WebML CG that makes this type of contribution possible. I also assume you'd be interested in continuing to maintain this project, but are looking for interested community participants to help you. Let us know if any of these assumptions are not correct.

@anssiko anssiko added the process label May 8, 2024
@egalli
Copy link
Author

egalli commented May 8, 2024

Sounds good to me.

@bbernhar
Copy link

FYI, this issue was encountered upon enabling MLBuffer in a WebNN EP.

@inexorabletash
Copy link
Member

https://github.com/webmachinelearning/webnn-types was created - empty so far!

@egalli if you've joined the CG, can you submit a PR against that repo to pull in your repo as a starting point?

Then maybe we can close this and just iterate on that repo?

@egalli
Copy link
Author

egalli commented Jul 12, 2024

I'm OK with closing this issue.

As for a PR, sorry to the delay, I'm going through an internal approval process at my company. This is required before I can officially upload the code.

@egalli
Copy link
Author

egalli commented Jul 12, 2024

Closing issue

@egalli egalli closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants