You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/09/15 20:52:59 UTC
[GitHub] [tvm] junrushao commented on a diff in pull request #12796: [MetaSchedule] Enable Clone Function for Task-Level Classes
junrushao commented on code in PR #12796:
URL: https://github.com/apache/tvm/pull/12796#discussion_r972410804
##########
src/meta_schedule/schedule_rule/add_rfactor.cc:
##########
@@ -36,6 +36,16 @@ class AddRFactorNode : public ScheduleRuleNode {
// Inherited from ScheduleRuleNode
Array<tir::Schedule> Apply(const tir::Schedule& sch, const tir::BlockRV& block_rv);
+ // Inherited from ScheduleRuleNode
+ ScheduleRule Clone() final {
+ ObjectPtr<AddRFactorNode> n = make_object<AddRFactorNode>(*this);
+ n->max_jobs_per_core = this->max_jobs_per_core;
+ n->max_innermost_factor = this->max_innermost_factor;
+ n->max_parallel_extent_ = this->max_parallel_extent_;
+ n->max_parallel_basic_ = this->max_parallel_basic_;
Review Comment:
Those fields are already copied in `make_object<AddRFactorNode>(*this)`
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org