Skip to content

Commit 0068ee9

Browse files
committed
lint fix
1 parent f093445 commit 0068ee9

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

src/op/parallel.cc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -413,18 +413,19 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
413413

414414
// check if loop body contains a "pure" buffer store (i.e., direct
415415
// assignment, not compound update)
416-
std::vector<Buffer> store_shared_global_buffers, store_fragment_buffers, store_buffers;
416+
std::vector<Buffer> store_shared_global_buffers, store_fragment_buffers;
417417
// Buffers that scope is above fragments.
418418
// global, shared, shared.dyn
419419
// which can be used to analysis replicate case
420420
PostOrderVisit(root_, [&](const ObjectRef &obj) {
421421
if (const auto *store = obj.as<BufferStoreNode>()) {
422422
auto buffer = store->buffer;
423-
if (buffer.scope() == "shared" || buffer.scope() == "shared.dyn" || buffer.scope() == "global"){
423+
if (buffer.scope() == "shared" || buffer.scope() == "shared.dyn" ||
424+
buffer.scope() == "global") {
424425
store_shared_global_buffers.emplace_back(buffer);
425-
} else if (buffer.scope() == "local.fragment")
426+
} else if (buffer.scope() == "local.fragment") {
426427
store_fragment_buffers.emplace_back(buffer);
427-
store_buffers.emplace_back(buffer);
428+
}
428429
}
429430
});
430431

@@ -491,14 +492,18 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
491492
// 2) The loop layout replicate extent is greater than 1, inferred from the
492493
// thread bounds captured in the layout.
493494

494-
[this, &store_shared_global_buffers, &store_fragment_buffers, &has_cross_thread_access, &T](){
495-
if (is_one(loop_layout_->ReplicateExtent())) return;
496-
if (!has_cross_thread_access) return;
495+
[this, &store_shared_global_buffers, &store_fragment_buffers,
496+
&has_cross_thread_access, &T]() {
497+
if (is_one(loop_layout_->ReplicateExtent()))
498+
return;
499+
if (!has_cross_thread_access)
500+
return;
497501

498502
if (!store_fragment_buffers.empty()) {
499503
ICHECK(store_shared_global_buffers.empty())
500-
<< "Invalid layout: cannot have both fragment and shared store buffers "
501-
"in replicated loop layout.";
504+
<< "Invalid layout: cannot have both fragment and shared store "
505+
"buffers "
506+
"in replicated loop layout.";
502507
return;
503508
} else {
504509
// Now, store is global or shared

src/transform/lower_intrin.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ class IntrinInjecter : public tvm::arith::IRMutatorWithAnalyzer {
160160
// == truncdiv(a + b*c, b) - c
161161
IntImm min(op->a->dtype.element_of(), const_int_bound->min_value);
162162
PrimExpr ceildiv = truncdiv((op->b - 1) - min, op->b);
163-
PrimExpr offset_numerator = analyzer_->Simplify(op->a + op->b * ceildiv);
163+
PrimExpr offset_numerator =
164+
analyzer_->Simplify(op->a + op->b * ceildiv);
164165
return truncdiv(offset_numerator, op->b) - ceildiv;
165166
}
166167

0 commit comments

Comments
 (0)