From cbe1f5e1a4d359237a45d5f7192b49bcb348c1e9 Mon Sep 17 00:00:00 2001 From: dabaiji Date: Sat, 27 Mar 2021 17:10:18 +0800 Subject: [PATCH] enhance reduce mapping: bind block for outer-fused-loop --- src/poly/tiling/tiling_strategy_manager_gpu.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/poly/tiling/tiling_strategy_manager_gpu.cc b/src/poly/tiling/tiling_strategy_manager_gpu.cc index 566c6848..fe3da7ae 100644 --- a/src/poly/tiling/tiling_strategy_manager_gpu.cc +++ b/src/poly/tiling/tiling_strategy_manager_gpu.cc @@ -642,14 +642,16 @@ void GpuStrategy::InnerThreadOuterBlock() { if (axis->block_constraints.map_extent_ > 1) { tile = std::max(tile, std::max(ceil(static_cast(shape) / axis->block_constraints.map_extent_), 1)); - pending_axes_.push_back(std::make_pair(axis, std::max(ceil(static_cast(shape) / tile), 1))); - ss << ", map to block."; } else { tile = std::min(tile, shape); } } axis->TileRestrainLower(tile, TileLevel::CACHE1); ss << ", tile = " << tile; + if (axis->block_constraints.map_extent_ > 1) { + pending_axes_.push_back(std::make_pair(axis, std::max(ceil(static_cast(shape) / tile), 1))); + ss << ", map to block."; + } analyzer_->GetTileLogger().AppendLog(GPU_MAPPING, ss); }; -- Gitee