Mousius commented on PR #14010: URL: https://github.com/apache/tvm/pull/14010#issuecomment-1438921089
> To implement the complete functionality of mixed precision we need passing the list of ops to be converted to mixed precision, precision type and other configurable options for mixed precision pass. All these are use case dependent. If we are good with enabling mixed-precision pass with it's configurable options, I am good to go this way. I think this makes sense, a naive first attempt is something like this? ``` --mixed-precision // Enables --mixed-precision-ops=nn.conv2d,nn.dense --mixed-precision-input=float16 --mixed-precision-output=float32 ``` > My use case is about embedding additional tuning cache and target precompiled OpenCL binary source into the module itself. These tuning cache and clBinary blobs will be generated by running the compiled modules on real device via RPC. I don't think we now encourage this way from the core compilation flow itself. IMHO, such first time requirements should enabled outside core compiler and later absorbed if there are more similar use cases. That definitely looks specific to OpenCL and loading precompiled OpenCL? Are all of these modules generated ahead of TVM compilation? I don't think it necessarily has to be deep in the core compiler, but it would make sense for such options to live near `Target` specific logic. It's a bit tricky to work through this without an example though, it'd be good to raise something outside this PR else I think this will take a lot longer. > `tvmc` is a great tool for new comers with it's simplicity and functionality. In my opinion, `tvmc` is a good starting point for a newbie to quickly achieve the entire process from CLI. On the other side, packed function system is not some thing we want to hide from users. We encourage users to register their own packed functions into TVM compiler flow as well as use TVM's packed functions. One of the reasons `tvmc` is simpler is because it doesn't expose many of the inner workings of TVM, such as the packed API, it abstracts many things to give a simpler user experience 😸 A large part of that is easily printing a help message and having arguments describe what they do, we may understand `--pre-build-hooks "adreno.mixed_precision_fp16"` but `--pre-build-hooks` would be hard to express to a user. I don't think we're disagreeing on the way forwards for mixed precision though? Shall we try and get that resolved and look to the OpenCL blobs at the same time? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
