Refactor device selection: Rename to computePolicy, remove accelerated, and add fallback#923
Refactor device selection: Rename to computePolicy, remove accelerated, and add fallback#923mingmingtasd wants to merge 3 commits into
Conversation
fdwr
left a comment
There was a problem hiding this comment.
Consider clearer naming, otherwise LGTM sir.
There was a problem hiding this comment.
Would like to see the references to CPU removed from the non-normative wording https://github.com/webmachinelearning/webnn/pull/923/changes#r3010808209 but otherwise no objections to the API surface changes ✅
|
I have no preference for the naming; I'll wait for the decision. For the description wording, I'm OK with not mentioning CPU to avoid being implementation-specific. |
mwyrzykowski
left a comment
There was a problem hiding this comment.
✅ with the current
"low-power",
"fallback"
values
|
|
We also acknowledged the following enhancements in our discussion today:
|
Thanks for your discussion! Let's keep the "fallback". And in the latest commit, I removed the "CPU" word in the description for "fallback". @mwyrzykowski |
anssiko
left a comment
There was a problem hiding this comment.
This is ready to be merged by the editors. Thank you all.
The editors can track the discussed enhancements #923 (comment) as deemed appropriate.
huningxin
left a comment
There was a problem hiding this comment.
LGTM, thanks @mingmingtasd !
To fix #911
Description:
This PR refactors the device selection preference API to establish a more extensible framework by replacing MLPowerPreference with MLComputePolicy in MLContextOptions.
Key changes included:
The corresponding chromium CL is https://chromium-review.googlesource.com/c/chromium/src/+/7513189
PTAL, thanks! @huningxin
Preview | Diff