merrymercy edited a comment on pull request #6190:
URL: https://github.com/apache/incubator-tvm/pull/6190#issuecomment-672266466
I organized the features into 5 groups.
```
// Group 1: Computation related features
// Group 2: Buffer access related features (per buffer)
// Group 3: Arithmetic intensity related features
// Group 4: Allocation related features
// Group 5: Outer scope related features
```
The specification can be found in
`src/auto_scheduler/feature.cc::FeatureSet`.
Each group has one corresponding extraction function, they are called in the
main visitor (`PerStoreFeatureExtractor`).
```c++
void VisitStmt_(const BufferStoreNode* node) final {
...
// Group 1: Computation related features
ExtractComputationFeature(node, math_op_counter);
// Group 2: Buffer access related features (per buffer)
ExtractBufferAccessFeature(node, math_op_counter, &cur_compute_ops,
&compute_ops_list,
&mem_bytes_list);
// Group 3: Arithmetic intensity related features
ExtractArithmeticIntensityFeature(node, cur_compute_ops,
compute_ops_list, mem_bytes_list);
// Group 4: Allocation related features
ExtractOuterScopeFeature(node);
}
void VisitStmt_(const BufferRealizeNode* node) final {
StmtExprVisitor::VisitStmt_(node);
// Group 5: Outer scope related features
ExtractAllocationFeature(node);
}
```
I think the code is very clean and much better than the old autotvm now.
I don't like registration or adding an extra layer of callback. It is just
over design and make things more complicated.
@tqchen @comaniac @FrozenGene @jroesch @junrushao1994 Your comments are all
addressed. This PR is ready to be merged.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]