Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/op/atomic_add.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "../target/utils.h"
#include "../transform/atomicadd_vectorize.h"
#include "../transform/common/loop_fusion_utils.h"
#include "../transform/common/loop_parallel_transform_utils.h"
#include "../transform/loop_partition.h"
#include "builtin.h"

Expand Down Expand Up @@ -658,8 +657,6 @@ Stmt AtomicAddNode::Lower(const LowerArgs &T, arith::Analyzer *analyzer) const {
}
auto simt_loop = MakeSIMTLoop(analyzer);
auto fused_loop = Downcast<For>(ParallelLoopFuser::Fuse(simt_loop));
auto transformed_loop =
Downcast<For>(ParallelLoopTransformer::Substitute(fused_loop));

auto GetArchInt = [&](const Target &tgt) -> int {
int arch_int = 0;
Expand Down Expand Up @@ -785,12 +782,12 @@ Stmt AtomicAddNode::Lower(const LowerArgs &T, arith::Analyzer *analyzer) const {
return {loop_layout, pred};
};

auto ret = AtomicAddInferLayout(transformed_loop,
{T.target, T.thread_bounds, T.layout_map,
analyzer, false, T.buffer_remap});
auto ret =
AtomicAddInferLayout(fused_loop, {T.target, T.thread_bounds, T.layout_map,
analyzer, false, T.buffer_remap});
Fragment loop_layout = ret.loop_layout;
auto thread_loop =
PartitionLoop(transformed_loop, T.thread_var, analyzer, loop_layout);
PartitionLoop(fused_loop, T.thread_var, analyzer, loop_layout);
auto vectorized_thread_loop =
VectorizeAtomicAdd(thread_loop, GetArchInt(target));
return vectorized_thread_loop;
Expand Down
8 changes: 2 additions & 6 deletions src/op/copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "../layout/tcgen05_layout.h"
#include "../target/utils.h"
#include "../transform/common/loop_fusion_utils.h"
#include "../transform/common/loop_parallel_transform_utils.h"
#include "../transform/loop_partition.h"
#include "../transform/loop_vectorize.h"
#include "utils.h"
Expand Down Expand Up @@ -716,19 +715,16 @@ Stmt CopyNode::LowerNormalCopy(const LowerArgs &T,
auto simt_loop = MakeSIMTLoop(analyzer);
auto fused_loop = Downcast<For>(ParallelLoopFuser::Fuse(simt_loop));

auto transformed_loop =
Downcast<For>(ParallelLoopTransformer::Substitute(fused_loop));

For vectorized_thread_loop;
auto par_op = ParallelOp(transformed_loop);
auto par_op = ParallelOp(fused_loop);

if (is_cpu_target || IsLocalBuffer(src) || IsLocalBuffer(dst)) {
if (IsLocalBuffer(src) && !IsLocalBuffer(dst)) {
LOG(WARNING) << "Copy from local buffer `" << src->name << "` to "
<< dst.scope() << " buffer `" << dst->name
<< "` may cause conflicted write.";
}
vectorized_thread_loop = VectorizeLoop(transformed_loop);
vectorized_thread_loop = VectorizeLoop(fused_loop);
return vectorized_thread_loop;
} else {
std::vector<InferLevel> levels = {InferLevel::kCommon, InferLevel::kStrict,
Expand Down
1 change: 0 additions & 1 deletion src/op/fill.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "../layout/tcgen05_layout.h"
#include "../target/utils.h"
#include "../transform/common/loop_fusion_utils.h"
#include "../transform/common/loop_parallel_transform_utils.h"
#include "../transform/loop_partition.h"
#include "../transform/loop_vectorize.h"
#include "builtin.h"
Expand Down
170 changes: 0 additions & 170 deletions src/transform/common/loop_parallel_transform_utils.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/transform/layout_inference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "arith/ir_mutator_with_analyzer.h"
#include "arith/ir_visitor_with_analyzer.h"
#include "common/loop_fusion_utils.h"
#include "common/loop_parallel_transform_utils.h"
#include "common/union_find.h"
#include "layout_reducer.h"
#include "parallel_loop_layout_validator.h"
Expand Down Expand Up @@ -1253,7 +1252,6 @@ class LayoutInferencer : public IRMutatorWithAnalyzer {
tvm::transform::Pass LayoutInference() {
using namespace tir::transform;
auto pass_func = [=](PrimFunc f, const IRModule &m, const PassContext &ctx) {
f.CopyOnWrite()->body = ParallelLoopTransformer::Substitute(f->body);
ThreadBindingCollector collector;
collector(f->body);
bool has_thread_binding = !collector.thread_binding_.empty();
Expand Down
Loading