Lunderberg commented on PR #13130: URL: https://github.com/apache/tvm/pull/13130#issuecomment-1305692756
A couple of notes to reviewers. These were things that I mentioned directly to @csullivan , but wanted to record them alongside the PR. * The best starting point for this PR is in [ControlFlowGraph::ForwardPropagateKnownValues](https://github.com/apache/tvm/blob/8af309b8b6408892a54961291553dfe24b3e8ec8/src/tir/analysis/control_flow_graph.cc#L1329), which is the core logic to determine the set of known values at each point in the control flow. Everything else relates to that core logic, either as data structures used by this method (e.g. [BufferTouch](https://github.com/apache/tvm/blob/8af309b8b6408892a54961291553dfe24b3e8ec8/src/tir/analysis/control_flow_graph.h#L43) and [BufferState](https://github.com/apache/tvm/blob/8af309b8b6408892a54961291553dfe24b3e8ec8/src/tir/analysis/control_flow_graph.h#L130)), visitors to generate known values before propagation ([ControlFlowGraphBuilder](https://github.com/apache/tvm/blob/8af309b8b6408892a54961291553dfe24b3e8ec8/src/tir/analysis/control_flow_graph.cc#L206)), or as consumers of the output after propagation (e.g. opt-in portions of [`tir::transform::Simplify`](https://g ithub.com/apache/tvm/pull/13130/files#diff-d8ae39a4f504886187c11d3de5f1eeecaf8c9e1ea0b5487f3db9d736c5ef3456R248)). * The key unit test is [`test_tir_transform_simplify.py::TestSimplifyUsingPartiallyProvenBufferValueScatter`](https://github.com/apache/tvm/blob/8af309b8b6408892a54961291553dfe24b3e8ec8/tests/python/unittest/test_tir_transform_simplify.py#L1627), which tests whether the locations of known zero values in the input can be propagated across a 1-d convolution, then used to prove specific locations in the output to be zero. Most of the other unit tests added by this PR validate smaller individual propagations/simplifications that contribute to this 1-d convolution example. -- 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]
