14:00:43 RRSAgent has joined #webmachinelearning 14:00:43 logging to https://www.w3.org/2019/08/08-webmachinelearning-irc 14:00:44 Zakim has joined #webmachinelearning 14:00:54 RRSAgent, make logs public 14:01:14 Meeting: WebML CG Teleconference – 8 August 2019 14:01:19 Chair: Anssi 14:01:26 Agenda: https://github.com/webmachinelearning/meetings/blob/master/telcons/2019-08-08-agenda.md 14:01:27 Ningxin_Hu has joined #webmachinelearning 14:01:34 kainino has joined #webmachinelearning 14:01:34 Scribe: Anssi 14:01:45 scribeNick: anssik 14:01:51 Regrets+ Thomas_Steiner 14:01:56 Present+ Anssi_Kostiainen 14:02:00 Present+ Rafael_Cintron 14:02:02 Rafael has joined #webmachinelearning 14:02:02 Present+ Ningxin_Hu 14:02:04 Present+ Ganesan_Ramalingam 14:02:09 present+ 14:02:11 Present+ Paul_McDaniel 14:02:23 Present+ Gabe_Esteven 14:02:39 Present+ Jonathan_Bingham 14:03:11 Present+ Kai_Ninomiya 14:03:31 Present+ Greg_Whitworth 14:03:38 RRSAgent, draft minutes v2 14:03:38 I have made the request to generate https://www.w3.org/2019/08/08-webmachinelearning-minutes.html anssik 14:03:53 Present+ Nikhil Thorat 14:03:56 Present+ Daniel Smilkov 14:04:04 Present+ Nikhil_Thorat 14:04:07 Present+ Daniel_Smilkov 14:04:10 :) 14:04:27 RRSAgent, draft minutes v2 14:04:27 I have made the request to generate https://www.w3.org/2019/08/08-webmachinelearning-minutes.html anssik 14:04:40 TOPIC: Define the set of operations and their specification 14:04:51 -> https://github.com/webmachinelearning/webnn/issues/17 Define the set of operations and their specification #17 14:05:17 anssik: we had a review of the proposed resolution and receiver good feedback we need to resolve, let's discuss that now. 14:05:50 ... the objective of this call is to resolve objections raised for the proposed resolution and clarify proposed resolution based on feedback where appropriate 14:06:38 To start, I captured the following questions from issue #17 we need to resolve: 14:07:06 nsthorat: "An important part of this specification will be ensuring this set of ops are compatible with the major ML JavaScript frameworks [...] it's not possible for us to move forward with this resolution without understanding compatibility." 14:07:41 jbingham: "what's the plan for dealing with versioning?" 14:07:55 jbingham: "How are custom ops defined and included in the graph?" 14:08:09 walrusmcd: "How many ops?" 14:08:29 jbingham: "Decide if a graph API is the right thing to standardize on" 14:09:13 anssik: To summarize, need to choose a set of operations to be included in the API that enables adequate compatibility in the major ML frameworks 14:09:56 q+ to ask about something 14:10:04 q+ to talk about something 14:10:19 q+ 14:10:22 q? 14:10:22 q+ to talk about onnx & tf lite compatibility doc: https://docs.google.com/document/d/1RXCkZ9mliWbqSakYvNlWhsRH4yFtnpe1YQQNFAIRZo8/edit 14:10:25 jonathan has joined #webmachinelearning 14:10:37 ack Nikhil 14:10:37 Nikhil, you wanted to talk about something and to talk about onnx & tf lite compatibility doc: https://docs.google.com/document/d/1RXCkZ9mliWbqSakYvNlWhsRH4yFtnpe1YQQNFAIRZo8/edit 14:11:04 Nikhil: shared doc on the chat, please take a look 14:11:25 ... spend time looking at compat, started with basic 2 ops, tried to understand diff 14:11:27 jdarpinian has joined #webmachinelearning 14:12:16 gabe has joined #webmachinelearning 14:12:23 ... starting with low number of ops is our preference and grow that over time to understand compat issues of each op 14:13:00 q+ 14:13:33 Present+ James_Darpinian 14:14:02 danielsmilkov: this is about diffing libs, looking into possible compat issue, 1) when comparing with NN API e.g. some ops allow fusing, we propose separate ops no fused kernel, under the hood implementer could fuse the ops so that it runs great on a particular hardware 14:14:39 ... ONNX is opinionated regarding the layout, TF lite wants channels come last, different hw depend channels first or channels last 14:14:49 ... which layout is better changes over time 14:16:31 Nikhil: would prefer to start very small with a POC that works, and have a plan how to grow that set of ops 14:16:39 q? 14:17:24 ... probably need a way to deal with custom ops, have a way in app space to describe custom ops share memory with matmul 14:17:26 ack? 14:17:29 ac? 14:17:31 q? 14:17:49 ack Rafael 14:18:27 Rafael: I agree with a plan to keep this hardware agnostic 14:18:39 awesome! that would be great. 14:18:47 regarding the script to convert onnx / tensorflow 14:20:10 Paul: everything Rafael basically yes, goal is to be hw agnostic 14:21:10 ... ONNX has done work on channel formats and hit these same issues, proposed solutions 14:21:18 q? 14:21:21 q+ to talk about op set & use cases 14:21:22 ack anssik 14:21:22 anssik, you wanted to ask about something and to 14:21:24 ack? 14:21:29 ack Ningxin_Hu 14:21:29 Ningxin_Hu, you wanted to talk about op set & use cases 14:22:17 Ningxin_Hu: thanks for the efforts of Nikhil and Daniel, great work! Agree with approach of starting with a small set of ops and validate compat with JS libs 14:23:26 ... proposal how to grow the op set: add ops that are needed to implement identified use cases 14:23:42 https://webmachinelearning.github.io/webnn/#usecases 14:23:50 q+ want to talk about custom ops technical details 14:24:26 op set and use cases: https://github.com/webmachinelearning/webnn/issues/17#issuecomment-508426036 14:24:29 [silence, agreement] 14:24:38 ack Nikhil 14:25:32 q+ Nikhil 14:26:10 Paul: we took an approach where we selected the ops that benefit from hw acceleration 14:26:28 ... a bit similar approach to CUDA 14:27:43 Ningxin_Hu: if we only select expensive ops that benefit from hw, that may impose perf penalty when doing context switching 14:28:19 Paul: I agree, it might be worth prototyping that now, assumption we're proposing is this hybrid approach (w/ WebGL) is viable 14:28:25 What other ML frameworks should review each op, like Daniel did for TensorFlow, and confirm compatibility before we finalize the definition? 14:30:15 Ningxin_Hu: agree with Paul's comments, interleaving with Wasm in POC, overhead was significant 14:30:51 Rafael: CPU readback is slow, staying with GPU compute shaders should work pretty well 14:30:57 q? 14:31:29 I have made the request to generate https://www.w3.org/2019/08/08-webmachinelearning-minutes.html anssik 14:32:02 q? 14:32:24 ack Nik 14:32:27 ack Nikhil 14:32:29 q? 14:32:30 q+ 14:32:36 ack jdarpinian 14:33:02 jdarpinian: I'm on the Chrome team and think custom ops based on WebGL can work, but will be very complex to implement 14:33:33 We think it's important to be able to have custom operations share memory with conv2d / matmul without doing a readback. for cpu-accelerators, share the buffer with WASM, for gpu-accelerators share the buffer with WebGL 14:33:52 ... portability between custom ops between different systems, CPU and GPU not very good 14:33:56 q+ talk about mem layout reordering overhead between custom ops and hw accelerated ops 14:34:05 q+ 14:34:14 q? 14:34:34 this allows us to grow the spec slowly and not have tail-end ops be bottlenecks and the webnn accelerated ops can get quick wins by accelerating the bottleneck ops (conv2d, matmul, etc) 14:34:37 Paul: I think Ningxin_Hu posted an architecture diagram 14:34:51 -> https://github.com/webmachinelearning/webnn/issues/17#issuecomment-518915131 arch diagram 14:35:28 Paul: frameworks will do the heavy lifting, web developer won't see the complexity 14:36:01 Nikhil: we think the same, but not all devices have WebGL backend so fallback to Wasm for example 14:36:07 q? 14:36:14 ack Ningxin_Hu 14:36:42 Ningxin_Hu: about custom ops, folks talked about memory transfer overhead 14:38:08 ... even long SIMD instructions on CPU can require tensor memory re-layout, an expensive operation 14:38:19 q? 14:38:29 q+ 14:39:35 anssik: it was asked on the issue whether graph is the right abstraction? 14:40:31 q+ 14:40:45 jonathan: what are the other JS frameworks we need to take into compatibility study? 14:41:32 Paul: in ONNX we considered all frameworks that matter, they have a voice in ONNX project 14:42:28 ... in ONNX we have considered PyTorch, Caffe, Intel's frameworks, Microsoft's frameworks, TensorFlow, we have ONNX to TF converter, Apple's CoreML 14:42:50 ... CoreML was part of the opset 1 compatibility 14:42:55 q? 14:43:31 Nikhil: specifically interested in JS ML frameworks 14:43:40 ... for compatibility 14:44:06 ... for example, Brain.js 14:44:54 Paul: we don't want to have two bodies managing op schema, right? 14:45:18 Nikhil: we want to grow slowly, right? 14:45:40 ... focus on web stuff to figure out an intersection of JS ML libraries, does that sounds reasonable? 14:46:41 Paul: ONNX does have namespace and versioning concepts, so we could create our own ONNX namespace for the ops references by Web NN API 14:47:22 Rafael: it is up to us to decide how many ops to adopt, the op definitions themselves would come from ONNX standards body 14:48:11 danielsmilkov: that makes sense, want to be clear, because of portability issues and JS libs as users, some changes needed to ONNX may be needed e.g. memory layout 14:48:43 Paul: that's fairly reasonable, ONNX community would certainly welcome that 14:48:58 danielsmilkov: relaxing, not breaking existing ONNX behaviour 14:49:13 ... going to custom ops 14:50:09 ... we deal with real models every way, need to add ops to TF, interoperability important for e.g. pre and post-processing of media, video 14:50:22 q? 14:50:48 ack jdarpinian 14:51:21 jdarpinian: also need to look into hardware we want to support, there's a lot of hardware out these and new coming up, e.g. neural engines coming up in ARM chips 14:51:44 q+ 14:51:58 Nikhil: that's a good point, e.g. for matmul would be good to do homework checking how that works across all hardware 14:55:28 anssik: Daniel and Nikhil could you move your doc https://docs.google.com/document/d/1RXCkZ9mliWbqSakYvNlWhsRH4yFtnpe1YQQNFAIRZo8/edit#heading=h.n1gbg8k8lggq into a GH issue 14:55:37 Nikhil: yes, we'll do that 14:56:29 danielsmilkov: GH issue #17 there's a comment where Ningxin_Hu proposed 14 ops, we could do the work to split these 14 ops into 3-4 GH issues with some logical bundling 14:57:24 PROPOSED RESOLUTION: The specification will reference the ONNX operations and if there are any improvements desired for ONNX the work should be there. 14:57:36 14 ops proposal: https://github.com/webmachinelearning/webnn/issues/17#issuecomment-512651711 14:58:41 PROPOSED RESOLUTION: The specification will reference a subset of the ONNX operations, starting small, adding more ops when compatibility with major ML JavaScript frameworks has been validated 14:58:48 q+ re: jdarpinian, want to point out it's important to not only understand the current and upcoming hardware, but since the browser runs in userspace we also need to run on top of the userspace apis (NNAPI, CoreML, DirectML) so we are constrained by how they expose things 14:59:31 q+ AI for custom ops 14:59:34 q? 14:59:43 ack want 14:59:43 want, you wanted to talk about custom ops technical details 14:59:46 q? 14:59:51 ack AI 14:59:51 AI, you wanted to discuss custom ops 14:59:56 ack kainino 14:59:56 kainino, you wanted to discuss jdarpinian, want to point out it's important to not only understand the current and upcoming hardware, but since the browser runs in userspace we 15:00:00 ... also need to run on top of the userspace apis (NNAPI, CoreML, DirectML) so we are constrained by how they expose things 15:00:35 kainino: we want to point out it's important to not only understand the current and upcoming hardware, but since the browser runs in userspace 15:00:43 ... we also need to run on top of the userspace apis (NNAPI, CoreML, DirectML) so we are constrained by how they expose things 15:00:49 q? 15:00:52 ack Nikhil 15:01:14 Nikhil: sharing memory with custom ops needs to be better understood 15:01:37 ... can you Ningxin_Hu do that investigation? 15:01:57 Ningxin_Hu: with help from james or kai we could make progress with custom ops issue 15:02:25 Rafael: have bandwith to help, but not time to drive 15:02:32 jdarpinian: the same, can help not drive 15:02:41 Ningxin_Hu: I can take the lead, with help from others 15:03:08 PROPOSED RESOLUTION: The specification will reference a subset of the ONNX operations, starting small, adding more ops when compatibility with major ML JavaScript frameworks has been validated 15:03:13 Ningxin_Hu: Please reach out to us as needed 15:03:23 oops that's supposed to be @Ningxin_Hu 15:03:39 thanks @kainino 15:05:10 https://www.w3.org/2019/09/TPAC/ 15:06:35 any concerns with the amended proposed resolution? 15:06:43 [hearing no concerns] 15:06:48 RESOLUTION: The specification will reference a subset of the ONNX operations, starting small, adding more ops when compatibility with major ML JavaScript frameworks has been validated 15:06:59 RRSAgent, draft minutes v2 15:06:59 I have made the request to generate https://www.w3.org/2019/08/08-webmachinelearning-minutes.html anssik 15:08:42 TOPIC: Adjourn 15:09:08 RRSAgent, draft minutes v2 15:09:08 I have made the request to generate https://www.w3.org/2019/08/08-webmachinelearning-minutes.html anssik 17:08:27 Zakim has left #webmachinelearning