14:53:25 RRSAgent has joined #webmachinelearning 14:53:29 logging to https://www.w3.org/2023/03/16-webmachinelearning-irc 14:53:29 RRSAgent, make logs Public 14:53:30 please title this meeting ("meeting: ..."), anssik 14:53:35 Meeting: WebML WG Teleconference – 16 March 2023 14:53:40 Chair: Anssi 14:53:46 Agenda: https://github.com/webmachinelearning/meetings/blob/main/telcons/2023-03-16-wg-agenda.md 14:53:51 Scribe: Anssi 14:53:56 scribeNick: anssik 14:54:00 scribe+ dom 14:54:15 ghurlbot, this is webmachinelearning/webnn 14:54:15 anssik, OK. 14:54:28 Present+ Anssi_Kostiainen 14:54:35 RRSAgent, draft minutes 14:54:37 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 15:00:39 ningxin_hu has joined #webmachinelearning 15:03:20 Present+ Dominique_Hazael-Massieux 15:03:26 Present+ Ningxin_Hu 15:03:31 Present+ Zoltan_Kis 15:03:36 Present+ Chai_Chaoweeraprasit 15:03:40 Present+ Rafael_Cintron 15:04:13 Topic: Proposed Charter 2023-2025 under W3C Advisory Committee review 15:04:27 -> Announcement https://lists.w3.org/Archives/Public/public-webmachinelearning-wg/2023Mar/0002.html 15:04:37 anssik: Please make sure your Advisory Committee representative brings input (and ideally support) on the review. 15:04:52 ... You'll find your AC rep contact details at https://www.w3.org/Member/ACList (login with your W3C Account) 15:04:58 chai has joined #webmachinelearning 15:05:02 ... The deadline for responses is 03:59 UTC 5 April 2023 15:05:06 ... or 23:59, Boston time on 4 April 2023 15:06:01 dom: nothing to add, it is important to get support from as many as possible 15:06:07 RafaelCintron has joined #webmachinelearning 15:07:29 Topic: WebNN - WebIDL and Infra standard conventions 15:08:03 anssik: we have aligned the core parts of the API with WebIDL conventions to satisfy CR criteria. These are documented as "Done" in https://github.com/webmachinelearning/webnn/issues/210#issuecomment-1326361748 15:08:12 ... we have editorial enhancements that have been waiting the CR publication to happen 15:08:24 ... because to keep the spec in a consistent and cohesive state for the CR publication before we start landing these 15:08:39 ... we will discuss 2 of those enhancements today, Zoltan has worked on these, much thanks, Ningxin reviewed 15:08:50 Subtopic: Sync and async algorithms 15:08:55 anssik: issue #316 15:08:56 https://github.com/webmachinelearning/webnn/issues/316 -> Issue 316 Review sync vs async compute differences (zolkis) Editorial 15:09:01 ... PR #329 15:09:02 https://github.com/webmachinelearning/webnn/issues/329 -> Pull Request 329 Rework the sync async algorithms based on #323 (zolkis) 15:09:39 zoltan: a 2nd take on #323 15:09:40 https://github.com/webmachinelearning/webnn/issues/323 -> Pull Request 323 [closed] Transfer the input and output views for asynchronous execution (huningxin) 15:10:01 ... updated based on ningxin's changes, factoring out the common part of sync & async executions 15:10:31 ... e.g. now we have validate and execute graph steps, referenced from both sync & async methods 15:10:53 ... it helps avoid repetition - mostly editorial 15:11:21 ... but would like clarity on whether to merge it now to avoid having too many branches in parallel 15:11:46 ... to me, it can be merged for our CR release 15:12:31 q+ 15:13:03 q? 15:13:08 ... would like chai to take a look so that we can merge it soon 15:13:09 ack ningxin_hu 15:13:27 https://github.com/webmachinelearning/webnn/issues/341 15:13:31 ningxin_hu: +1 to merging it for CR - it's an editorial improvement that also fixes #341 15:13:41 https://github.com/webmachinelearning/webnn/issues/341 -> Issue 341 Should validate MLGraph.[[context]] in MLContext.compute() and MLContext.computeSync() steps (huningxin) question 15:14:28 chai: I'll take a look it, this week or next 15:14:59 q? 15:15:05 q+ 15:15:09 ack RafaelCintron 15:16:01 RafaelCintron: what happens if the Web developer calls async passing arraybuffers and change the values of the arraybuffer before the compute promise returns? 15:16:30 zolkan: that's handled by the transfer-input and output steps which ningxin fixed 15:17:19 RRSAgent, draft minutes 15:17:21 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 15:18:08 ninginx: right - we've fixed that race condition while avoiding copy overhead in #323 15:18:09 https://github.com/webmachinelearning/webnn/issues/323 -> Pull Request 323 [closed] Transfer the input and output views for asynchronous execution (huningxin) 15:19:11 Subtopic: MLOperand and MLActivation internal slots 15:19:20 anssik: issue #336 15:19:21 https://github.com/webmachinelearning/webnn/issues/336 -> Issue 336 Add internal slots to MLOperand, MLActivation and basic algorithms (zolkis) Editorial 15:19:25 ... PR #337 15:19:26 https://github.com/webmachinelearning/webnn/issues/337 -> Pull Request 337 Add internal slots to MLOperand and MLActivation (zolkis) 15:20:33 zoltan: this to help fix lack of clarity around MLActivation (née MLOperator) 15:21:10 ... #337 uses internal slots for the usual attributes, but also to link to the operator 15:21:32 ... I was also experimenting with describing constructors, but removed it based on Ningxin's feedback 15:21:58 ... Ningxin reviewed the PR, other feedback welcome 15:22:24 ... MLActivation also has an implementation internal slot that will be needed for other algorithms improvements to come in other PRs 15:22:50 ... there may be additional changes needed as we improve the algorithms of other functions 15:23:05 ... but we can do this iteratively 15:23:40 ... this PR is a prerequisite to start these iterations 15:23:44 q? 15:24:10 q+ 15:25:17 ack ningxin_hu 15:25:53 ningxin: could we have separate PRs for internal slots for MLOperand and MLActivation? 15:26:06 zoltan: we could - right now they're separate commits 15:26:15 ... (but further amendments aren't) 15:27:13 ... I think they belong to the same PR because they're needed as a combination to iterate 15:27:28 Ningxin: I need to take another look now that you've incorporated my feedback 15:30:12 zoltan: no matter what, I'll need an MLActivation internal slot; but I think the current PR should be consistent with your feedback 15:31:38 ... let's see what Ningxin says - if there are still open issues on MLActivation, I'll split the PR 15:31:41 sgtm 15:31:44 q? 15:31:44 ... but if not, then we could land it as one 15:32:16 Topic: WebNN - enhancements, editorials, questions 15:32:34 Subtopic: Simplify the operand layout support of conv2d and pooling 2d operations 15:32:46 anssik: issue #324 15:32:47 https://github.com/webmachinelearning/webnn/issues/324 -> Issue 324 Simplify the operand layout support of conv2d and pooling 2d operations (huningxin) enhancement 15:32:52 ... "In the existing WebNN spec, conv2d supports two input operand layouts defined by MLInputOperandLayout and four filter operand layouts defined by MLConv2dFilterOperandLayout." 15:33:54 ningxin_hu: this emerged from implementation feedback 15:34:22 ... not all OSes support all layouts 15:34:24 RRSAgent, draft minutes 15:34:25 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 15:35:05 ... which forces to emulate the unsupported layouts 15:35:20 zolkis has joined #webmachinelearning 15:35:36 ... it's mostly a matter to insert a transpose operation in the underlying implementation 15:35:48 ... but that adds overhead in the graph compute 15:36:58 ... when the transpose is applied to a constant, it is done in the build phase, but for the input tensor, it would have to happen at compute time 15:38:58 q? 15:40:04 ... limiting the supported input and filter layouts would help let that overhead handle by the frameworks 15:40:12 s/handle/be handled/ 15:40:50 ... we need to WG's input of which layouts to support 15:40:51 q+ 15:40:56 ack dom 15:41:14 dom: is there any layout that is supported across all platforms? 15:41:41 ningxin: XNNPack only supports nhwc, directml supports both 15:41:47 ... other platforms needs more investigation 15:42:10 anssi: is transpose sync implemented? how complete is it? 15:42:40 ningxin_hu: not implemented yet, but native APIs already have it and we could investigate it 15:43:01 anssi: great example of implementation feedback we're seeking 15:43:24 ... it probably needs to stay open to gather input 15:44:14 chai: the layout only matters when the hardware prefers something, transposing to match the hardware layout loses performance 15:44:29 ... ONNX took the position to stick with one layout and leaves the rest to the backend 15:44:41 ... but here WebNN is the backend and has to pick a layout 15:46:04 Anssi: is this blocking implementation work, or can this be left open for a while? 15:46:34 ningxin: it isn't blocking - right now we're throwing an exception if the layout isn't supported 15:46:43 ... there probably should be a better way to exposing that to the developers 15:46:52 s/the d/d/ 15:47:15 q? 15:47:37 dom: is the throwing behaviour defined in the spec? 15:47:54 ningxin_hu: it probably needs to be defined in the algorithm steps 15:49:20 dom: I think it is more than enhancement, some of Zoltan's changes are very specific, here layout is tied to hardware support, something we can address 15:49:21 q+ 15:49:55 ningxin: right, based on current spec, an implementation would have to support all layouts 15:50:25 ... throwing is an implementation decision that doesn't match the spec at this point 15:51:12 q? 15:51:15 ack chai 15:51:56 chai: layout is not something you need to query the hardware to understand what it supports 15:52:10 ... it's at the framework level they would define the type of input they want 15:52:21 s/input/input layout 15:53:04 ... once that input layout is translated in the backend, the backend has to adapt to the "historical format preference" 15:53:32 ... when WebNN compiles the graph (in the build step), that's the time it needs to query the driver its preference (or anti-preference) 15:54:07 ... in some cases, it's only a preference, in some cases a requirement 15:54:51 ... the backend can resolve this by inserting a transpose, or manipulating the stride using jump reads instead of block reads 15:54:56 ... it depends on the performance characteristics 15:55:12 ... a transpose may be wasting time compared to a stride since it forces a copy 15:55:48 ... sometimes it's worth it if there are 50 layers of convolutions with a layout preference 15:56:48 ... WebNN as a backend has to support both layouts 15:58:16 anssi: so I'm hearing WebNN needs to be liberal in what it accepts 15:58:33 Chai: yes, webNN needs to be flexible in the formats it can handle 15:58:37 q? 15:58:45 q+ 15:58:46 ... the implementation will make it happen with the info from the driver 15:59:01 ack zolkis 15:59:31 RRSAgent, draft minutes 15:59:32 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 15:59:55 ... the implementation cannot fail on unsupported formats, it needs to carry on 16:01:41 ... if it can't be done, it should fail at the compile stage 16:01:58 q? 16:03:56 RRSAgent, draft minutes 16:03:57 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 16:04:53 RRSAgent, draft minutes 16:04:54 I have made the request to generate https://www.w3.org/2023/03/16-webmachinelearning-minutes.html anssik 18:04:25 Zakim has left #webmachinelearning