|
|
|
@@ -1352,6 +1352,7 @@ void TilingAnalyzer::AddPostTilingConstraints() { |
|
|
|
if (scop_info_.user_config_.GetTarget() == TARGET_CUDA) { |
|
|
|
ReduceStrategy reduce_strategy(this); |
|
|
|
ModStrategy mod_strategy(this); |
|
|
|
ModShiftAxisStrategy mod_shift_strategy(this); |
|
|
|
GemmStrategy gemm_strategy(this); |
|
|
|
GpuDmaAnalysisStrategy dma_analysis_strategy(this); |
|
|
|
CustomTilingStrategy custom_strategy(this); |
|
|
|
@@ -1364,6 +1365,7 @@ void TilingAnalyzer::AddPostTilingConstraints() { |
|
|
|
} else { |
|
|
|
actived_strategies.push_back(&reduce_strategy); |
|
|
|
actived_strategies.push_back(&mod_strategy); |
|
|
|
actived_strategies.push_back(&mod_shift_strategy); |
|
|
|
actived_strategies.push_back(&gemm_strategy); |
|
|
|
} |
|
|
|
actived_strategies.push_back(&gpu_strategy); |
|
|
|
@@ -1411,7 +1413,7 @@ void TilingAnalyzer::AddTilingConstraints() { |
|
|
|
|
|
|
|
ReduceStrategy reduce_strategy(this); |
|
|
|
DmaAlignStrategy dma_align_stratgey(this); |
|
|
|
|
|
|
|
|
|
|
|
if (!scop_info_.user_config_.GetIsTuning()) { |
|
|
|
actived_strategies.push_back(&reduce_strategy); |
|
|
|
actived_strategies.push_back(&dma_align_stratgey); |
|
|
|
@@ -1448,7 +1450,7 @@ void TilingAnalyzer::AddTilingConstraints() { |
|
|
|
|
|
|
|
bool TilingAnalyzer::Prepare() { |
|
|
|
logger_ = std::unique_ptr<TileLogger>(new (std::nothrow) TileLogger( |
|
|
|
scop_info_.AddDumpDir("tiling.log"), !scop_info_.user_config_.GetDumpPolyDir().empty())); |
|
|
|
scop_info_.AddDumpDir("tiling.log"), !scop_info_.user_config_.GetDumpPolyDir().empty())); |
|
|
|
CHECK(logger_) << "memory alloc fail."; |
|
|
|
// Stage 1: Analyze schedule tree. |
|
|
|
ScheduleTreeAnalyzer sch_ana(this, this->sch_); |
|
|
|
|