At this point the best option appear to be to defer this change. Let's revisit this when the SCF dialect has corresponding tests for this interface. Right now, we aren't able to effectively exercise it, and lack access to precedent material on this interface that we can effectively utilize to construct tests, and don't have familiarity with this domain of MLIR. Thank you for your feedback!
Jan 11 2021
Dec 14 2020
Bringing this up again. May I proceed with this ?
Dec 9 2020
I've attempted to reconstruct the tests with insights from the sccp tests. While doing so, I restricted this interface to cond_if() alone to simplify this effort. I've also changed the conditional of the op to just a boolean I1 rather than an unnecessary I1Tensor, allowing the check in getSuccessorRegions() to work without modification.
Dec 7 2020
Dec 3 2020
Incorporated rriddle's feedback and added tests .
Nov 24 2020
Nov 7 2020
Thank you for these cleanup additions!
To suit the flavor of the season, we need a recount here - there was more than 204 since some appear to have disappeared along with deleted files :-)
Removed TosaTraits and TosaTypes headers. Will add when implemented.
Nov 6 2020
Removed extra path in test/Dialect/Tosa .
Updates to feedback from rriddle
Fixed typo in inlining test. Reran check-mlir to confirm.
stellaraccident: Removed extraneous tests as suggested
mehdi_amini: added test decorators.
Incorporates feedback from stellaraccident, rriddle, mehdi_amini
- Cleanup nits and mechanicals
- Removed extraneous tests
- Quantization Builders in C++ now
- Aligned pass invocation with current approach
- 80-col alignment
Nov 5 2020
We'll work on these nits and upload a new patch soon. Since we're new to this, if the next patch looks ok, then please do land it on our behalf as an act of approval.
- Aesthetic cleanups, usage of better MLIR constructs
- Unit tests
- WIP rationale document
Oct 30 2020
Missed one file update in prior commit
Updated to incorporate comments from mehdi_amini and stellaraccident.
Oct 29 2020
Sure, but can you point out exactly where is it tested in this patch? My basic mental model is: if I change the behavior of any line of code, will it fails when running ninja check-mlir?
Again: the benefit of splitting this is that we can land patches more incrementally, and individual important pieces, like moveOutOfLoop and the LoopLikeOpInterface can be tested in isolation with the patch that land them.
These are both good questions. It seems they could both be resolved if we add tests to exercise these in mlir/test/Dialect/Tosa . If so, could we please do that as a follow on effort ?
I'm happy to review the code right now, but I'd also like the tests to get in with the code and not as a follow-up. In general we don't land patches without tests as far as I know.
In the context of this patch, I just randomly sampled some functions involved here and couldn't find an obvious caller? For example buildQTypeAttrFromMinMax or all the computeMultiplierAndShift*
Updates to incorporate feedback from bondhugula and mehdi_amini .
- Comment formatting
- camelCase vars
- Removed extraneous computeMultiplierAndShift* functions
Thanks, really nice!
Can you split out some pieces so we can focus on the dialect itself mostly?
I'm thinking about the QuantUtils parts (which aren't used/tested in this patch anyway) and a few things like the TosaMakeBroadcastable pass, or the TosaOpInterface or the moveOutOfLoop() method and similarly things which aren't clearly needed right now.