You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ju...@apache.org on 2022/08/09 07:45:47 UTC

[tvm] branch main updated: [MetaSchedule][Bugfix] Feature: Strides of buffer access (#12331)

This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 5fe756a965 [MetaSchedule][Bugfix] Feature: Strides of buffer access (#12331)
5fe756a965 is described below

commit 5fe756a9656bdbf1f6a864ad147bc48636c97442
Author: Kathryn (Jinqi) Chen <65...@users.noreply.github.com>
AuthorDate: Tue Aug 9 00:45:38 2022 -0700

    [MetaSchedule][Bugfix] Feature: Strides of buffer access (#12331)
    
    I fixed a bug in MetaSchedule per_store_feature.cc
---
 src/meta_schedule/feature_extractor/per_store_feature.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/meta_schedule/feature_extractor/per_store_feature.cc b/src/meta_schedule/feature_extractor/per_store_feature.cc
index c29e5d61f0..571bb2face 100644
--- a/src/meta_schedule/feature_extractor/per_store_feature.cc
+++ b/src/meta_schedule/feature_extractor/per_store_feature.cc
@@ -885,7 +885,7 @@ void Feature::SubFeature::SetStride(const LoopNest& loop_nest, arith::Analyzer*
   // Calculate this->prod
   int64_t& prod = this->prod_non_strided_loop_extent = 1;
   for (int j = n_loops - 1; j > i; --j) {
-    if (const int64_t* extent = GetLoopIntExtent(loops[n_loops - 1])) {
+    if (const int64_t* extent = GetLoopIntExtent(loops[j])) {
       prod *= *extent;
     }
   }
@@ -894,7 +894,7 @@ void Feature::SubFeature::SetStride(const LoopNest& loop_nest, arith::Analyzer*
 void Feature::SubFeature::SetReuse(const LoopNest& loop_nest, int64_t top_loop_touch_bytes,
                                    const ForBufferMap<IntVec>& buffer_touched_under_loop) {
   const BufferNode* buffer = this->buffer;
-  // Step 0. Collect all `Var`s that appears in the buffer region
+  // Step 3.1. Collect all `Var`s that appears in the buffer region
   std::unordered_set<const VarNode*> region_vars;
   for (const MultiIndex& multi_index : this->multi_indices) {
     for (const PrimExpr& index : multi_index) {