webmachinelearning / model-loader

🧪 Model Loader API
https://webmachinelearning.github.io/model-loader/
Other
30 stars 10 forks source link

"default" v.s. "auto" in MLDevicePreference and MLPowerPreference #30

Open yuhonglin opened 2 years ago

yuhonglin commented 2 years ago

Regarding the value that MLDevicePreference and MLPowerPreference can take, WebNN uses "default" as one value (https://webmachinelearning.github.io/webnn/#api-ml) but I feel maybe "auto" is more suitable because in this case, the backend will automatically determine the running environment. "auto" carries more message than "default". What do you think?

yuhonglin commented 2 years ago

@huningxin

huningxin commented 2 years ago

@yuhonglin Thanks for brining this up. I think this is a good proposal and a good topic for WG discussion. /cc @anssiko , WDYT?

anssiko commented 2 years ago

@yuhonglin https://github.com/webmachinelearning/webnn/issues/169 is now cross-referenced.

Also WIP PR https://github.com/webmachinelearning/webnn/pull/257 discusses whether to make device selection normative for WebNN.