masahi commented on a change in pull request #10561:
URL: https://github.com/apache/tvm/pull/10561#discussion_r824098532
##########
File path: src/relay/backend/te_compiler_cache.cc
##########
@@ -347,26 +270,127 @@ class ScheduleBuilder : public
backend::MemoizedExprTranslator<Array<te::Tensor>
return {tuple[op->index]};
}
+ public:
+ // Additional outputs
+ Array<tvm::te::Tensor> fn_inputs_;
+ Array<te::Operation> scalars_;
+ std::unordered_map<const ConstantNode*, te::Tensor> constant_tensors_;
+ std::string candidate_name_;
+ OpImplementation anchor_implementation_;
+
private:
tvm::Target target_;
- Op anchor_op_;
- Attrs anchor_attrs_;
- int anchor_op_pattern_{0};
- OpImplementation anchor_implementation_;
std::ostringstream readable_name_stream_;
- Array<te::Operation> scalars_;
- std::unordered_map<const ConstantNode*, te::Tensor> constant_tensors_;
- bool use_auto_scheduler_;
- bool use_meta_schedule_;
+ // Index of the global constants
+ static int const_index;
// Cache device copy op for equivalence checking to reduce registry lookup
// overhead for each invocation of call node when retrieving schedules.
const Op& device_copy_op_;
- bool create_schedule_;
- // Index of the global constants
- static int const_index;
};
-int ScheduleBuilder::const_index = 0;
+int LowerToTECompute::const_index = 0;
+
+// Construct a schedule for a given Relay primitive function and target.
+class ScheduleBuilder : ExprVisitor {
Review comment:
It's a bit hard to come up with a good name since this class does a lot
more than "schedule building". See
https://github.com/apache/tvm/pull/10561/files#r824096015
Over time we stuffed all lowering-dependent tasks onto this class...
--
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]