Skip to content

Update with an example HW selection guide and new use cases #860

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

Merged

Conversation

zolkis
Copy link
Collaborator

@zolkis zolkis commented Jun 5, 2025

Added more detailed examples for possible HW acceleration selection principles.
Added the use case discussed in #836


Preview | Diff

Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
zolkis pushed a commit to zolkis/webnn that referenced this pull request Jun 17, 2025
This commit comprehensively updates the device selection explainer to reflect the latest discussions, API changes, and community feedback.

Key changes include:
- Updated Introduction and History sections to accurately reflect the removal of `MLDeviceType` from `MLContextOptions` (following PR webmachinelearning#809) and the shift towards hint-based, implementation-led device selection.
- Clarified the impact of key issues (webmachinelearning#749, webmachinelearning#302, webmachinelearning#350) and PRs (webmachinelearning#809, webmachinelearning#824, webmachinelearning#855) on the device selection strategy.
- Ensured the "Key use cases and requirements" section aligns with the current API, incorporating the device preference use cases from PR webmachinelearning#855.
- Updated JavaScript examples in "Scenarios, examples, design discussion" to be consistent with the current API, marking future/hypothetical features (like `opSupportLimitsPerDevice()` and a `fallback` option) with explanatory notes.
- Added new open questions based on recent discussions (e.g., issue webmachinelearning#836, PR webmachinelearning#854 regarding querying actual device usage).
- Refined the "Background thoughts" section, particularly the "Example Hardware Selection Guide," adding an editor's note about ongoing discussions (PR webmachinelearning#860).
- Corrected the "Considered alternatives" and "Minimum Viable Solution" sections to accurately represent the current and past approaches.
- Updated the "Next Phase Device Selection Solution" to clarify the status of proposals like `querySupport` (issue webmachinelearning#815) and the investigation of `graph.devices` (issue webmachinelearning#836, PR webmachinelearning#854).
- Performed a full proofread, correcting grammar, typos, and markdown formatting for improved clarity and consistency throughout the document.
zolkis pushed a commit to zolkis/webnn that referenced this pull request Jun 17, 2025
This commit comprehensively updates the device selection explainer to reflect the latest discussions, API changes, and community feedback.

Key changes include:
- Updated Introduction and History sections to accurately reflect the removal of `MLDeviceType` from `MLContextOptions` (following PR webmachinelearning#809) and the shift towards hint-based, implementation-led device selection.
- Clarified the impact of key issues (webmachinelearning#749, webmachinelearning#302, webmachinelearning#350) and PRs (webmachinelearning#809, webmachinelearning#824, webmachinelearning#855) on the device selection strategy.
- Ensured the "Key use cases and requirements" section aligns with the current API, incorporating the device preference use cases from PR webmachinelearning#855.
- Updated JavaScript examples in "Scenarios, examples, design discussion" to be consistent with the current API, marking future/hypothetical features (like `opSupportLimitsPerDevice()` and a `fallback` option) with explanatory notes.
- Added new open questions based on recent discussions (e.g., issue webmachinelearning#836, PR webmachinelearning#854 regarding querying actual device usage).
- Refined the "Background thoughts" section, particularly the "Example Hardware Selection Guide," adding an editor's note about ongoing discussions (PR webmachinelearning#860).
- Corrected the "Considered alternatives" and "Minimum Viable Solution" sections to accurately represent the current and past approaches.
- Updated the "Next Phase Device Selection Solution" to clarify the status of proposals like `querySupport` (issue webmachinelearning#815) and the investigation of `graph.devices` (issue webmachinelearning#836, PR webmachinelearning#854).
- Performed a full proofread, correcting grammar, typos, and markdown formatting for improved clarity and consistency throughout the document.
This commit comprehensively updates the device selection explainer to reflect the latest discussions, API changes, and community feedback.

Key changes include:
- Updated Introduction and History sections to accurately reflect the removal of `MLDeviceType` from `MLContextOptions` (following PR webmachinelearning#809) and the shift towards hint-based, implementation-led device selection.
- Clarified the impact of key issues (webmachinelearning#749, webmachinelearning#302, webmachinelearning#350) and PRs (webmachinelearning#809, webmachinelearning#824, webmachinelearning#855) on the device selection strategy.
- Ensured the "Key use cases and requirements" section aligns with the current API, incorporating the device preference use cases from PR webmachinelearning#855.
- Updated JavaScript examples in "Scenarios, examples, design discussion" to be consistent with the current API, marking future/hypothetical features (like `opSupportLimitsPerDevice()` and a `fallback` option) with explanatory notes.
- Added new open questions based on recent discussions (e.g., issue webmachinelearning#836, PR webmachinelearning#854 regarding querying actual device usage).
- Refined the "Background thoughts" section, particularly the "Example Hardware Selection Guide," adding an editor's note about ongoing discussions (PR webmachinelearning#860).
- Corrected the "Considered alternatives" and "Minimum Viable Solution" sections to accurately represent the current and past approaches.
- Updated the "Next Phase Device Selection Solution" to clarify the status of proposals like `querySupport` (issue webmachinelearning#815) and the investigation of `graph.devices` (issue webmachinelearning#836, PR webmachinelearning#854).
- Performed a full proofread, correcting grammar, typos, and markdown formatting for improved clarity and consistency throughout the document.
@zolkis zolkis force-pushed the device-selection-explainer-next branch from 989dd20 to 8fecc6c Compare June 17, 2025 20:10
Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
@zolkis
Copy link
Collaborator Author

zolkis commented Jun 17, 2025

Used Jules for proofreading and improving the text.

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few suggestions based on feedback from Google Meet.

Is it possible to ask Jules to carve out purely editorial changes to a separate commit to ease review of material changes?

…to the back.

Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
@zolkis
Copy link
Collaborator Author

zolkis commented Jun 26, 2025

Action point for the WG call: clarify the term (and discuss alternatives) "accelerated execution".

@zolkis
Copy link
Collaborator Author

zolkis commented Jun 26, 2025

I suggest reading the draft at
https://github.com/zolkis/webnn/blob/device-selection-explainer-next/device-selection-explainer.md

We should perhaps draw a line between recently validated vs prior work.

As for now, I'd consider the sections up to and including Key use cases and requirements as recently reworked that are ready for discussion.

@handellm, @reillyeon, @huningxin, @mwyrzykowski, @fdwr could you please check if I captured these use cases right and if they cover your use cases / concerns? Feel free to complete, rewrite, suggest.

Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
@handellm
Copy link

Thanks for summarizing. The section up to and including "key use cases" LGTM with some spelling nits.

Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update to the use cases and supplementary material looks good to be merged. I'm also considering @handellm's comment in #860 (comment) as a positive signal.

The usual reminder:
As an explainer this doc is work-in-progress and further updates are expected. Feedback welcome via issue #815 and direct contributions as new PRs.

@anssiko anssiko merged commit 4927ec5 into webmachinelearning:main Jun 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants