Details
- Reviewers
jpienaar - Commits
- rG7dec20dbb6ae: [mlir-reduce] Add doc for usage of mlir-reduce
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Quick pass ๐
mlir/docs/Tools/MLIRREDUCE.md | ||
---|---|---|
1 | Could the filename of the doc match the file name of the tool? | |
5 | Let's consistently capitalize MLIR | |
5 | trigger bugs? Unexpected behavior feels passive :-) We want to be able to reduce the size of a reproducer for a bug. | |
12 | One of the largest ones (the largest?) is simply deleting code not required to reproduce an error. Which is done very heuristically/without maintaining any semantics. I think that's important to have early that it's not an optimization, this changes the program in a way that is "wrong" but useful. | |
14 | Let's explain interesting right after. |
mlir/docs/Tools/mlir-reduce.md | ||
---|---|---|
5 โ | (On Diff #350238) | An MLIR input ? (it need not be a Module) |
7โ8 โ | (On Diff #350238) | describes mlir-reduce, a tool that can reduce the size of the input needed to trigger the error. |
10 โ | (On Diff #350238) | This whole document is about MLIR reduce, so I think you can remove this heading |
12โ13 โ | (On Diff #350238) | s/.../including/ ? |
15 โ | (On Diff #350238) | s/a module/an input/g (just to be more general, any top level input could work) |
15โ16 โ | (On Diff #350238) | s/.../is interesting, e.g., exhibits the characteristics that you would like to focus on/ (shorten and combine with next sentence) |
18 โ | (On Diff #350238) | s/.../invocation fails/ ? (just a little bit more general but I think specific enough still) |
20โ21 โ | (On Diff #350238) | I feel this could go close to the start, just before the last sentence in first paragraph. |
23 โ | (On Diff #350238) | Lets tag this section with a heading "Available reducer passes" or some such I would consider doing an example invocation here to show usage before explaining all the different reducers |
25 โ | (On Diff #350238) | You may have to clarify here what you mean with redundant. I believe it is meant as extraneous to interestingness (e.g., we can remove them and the case remains interesting, rather than they are redundant to the semantics of the input) |
26 โ | (On Diff #350238) | s/way// |
27 โ | (On Diff #350238) | s/.../as long as it/ |
27 โ | (On Diff #350238) | Is this true now? I thought we now ran verification too, so the output is still valid. |
33 โ | (On Diff #350238) | It isn't necessarily that one knows this, it is more that the pattern will be attempted and if it doesn't retain the problem, it will just be discarded (e.g., it would naturally not be explored further wherever the pattern does not retain the interestingness) |
39 โ | (On Diff #350238) | s/abundant// :) (or potentially we could just say MLIR does not have a fixed set of dialects) |
39 โ | (On Diff #350238) | In a way all is custom and so nothing is custom. There aren't 2 tiers here, how its defined is uniform. So I'd drop this. Or you could say "dialect specific rewrite patterns" |
62 โ | (On Diff #350238) | Perhaps, you can freely intermix regular optimization passes (that retain semantics) with reducer specific passes? |
78 โ | (On Diff #350238) | s/hint/specify/ ? |
94 โ | (On Diff #350238) | [for follow up] That is a bit surprising. Could we change that? standard in or positional argument is how mlir-opt and the other tools work. Being able to pipe the result from a tool into reduce would be nice too (but I don't know if the input file is too hard coded). |
98 โ | (On Diff #350238) | And this is only needed if 1) one uses custom syntax, 2) failure is due to verification in dialect, 3) there is dialect-specific reducer patterns? |
117 โ | (On Diff #350238) | reduce |
120 โ | (On Diff #350238) | You mean somewhere on disk? Perhaps lets rephrase this, the feature we want is that it should produce the most optimal result thus far when interrupted. |
123 โ | (On Diff #350238) | OOC why does this matter? As long as it is interesting model, the tool just trying all the things seems OK (potentially inefficient if we know some won't help, but not sure beyond that) |
mlir/docs/Tools/mlir-reduce.md | ||
---|---|---|
25 โ | (On Diff #350238) | Agree, the redundant may be confusing. Removed |
27 โ | (On Diff #350238) | Yes, mlir-reduce now only accepts/outputs valid file. Explained in down below, "To avoid that...". Just want to remind that the user also needs to provide valid input. |
39 โ | (On Diff #350238) | Removed. Yes, I think it'll be simpler. |
62 โ | (On Diff #350238) | Yes, I'm thinking of merging the two passes into one, this may be easier for the user's perspective(only choose the tree traversal strategies, don't bother with the set of regular optimization passes) I'm planning that now and will have solution soon. We can keep the doc in sync with it during the review. |
94 โ | (On Diff #350238) | Revisiting this part, will update this afterwards |
98 โ | (On Diff #350238) | Add the explanation of when we need a custom one. |
123 โ | (On Diff #350238) | I was uncertain for this one, was thinking the case like, we knew that some patterns won't work then we can exclude them for getting shorter reduce time. Now I think we should let the user as easy as possible to use it. the item is removed. |
Nice, thanks!
mlir/docs/Tools/mlir-reduce.md | ||
---|---|---|
6 โ | (On Diff #354450) | "we" or perhaps even better "developers" |
Could the filename of the doc match the file name of the tool?