diff --git a/include/tvm/tir/data_layout.h b/include/tvm/tir/data_layout.h index 5eaa1909a539f..0157db035f42b 100644 --- a/include/tvm/tir/data_layout.h +++ b/include/tvm/tir/data_layout.h @@ -128,7 +128,7 @@ class Layout : public ObjectRef { explicit Layout(const Array& axes); /*! \brief construct from a string */ - Layout(const char* name) : Layout(String(name)) {} // NOLINT(*) + Layout(const char* name) : Layout(String(name)) {} // NOLINT(*) Layout(const std::string& name) : Layout(String(name)) {} // NOLINT(*) /*! @@ -211,8 +211,7 @@ class Layout : public ObjectRef { for (auto dst_axis : dst_layout->axes) { if (LayoutAxis::Get(dst_axis).IsPrimal()) { if (!this->Contains(LayoutAxis::Get(dst_axis))) { - new_src_layout_str.operator std::string() += - dst_axis->var->name_hint.operator std::string(); + new_src_layout_str.operator std::string() += dst_axis->var->name_hint.c_str(); } } } diff --git a/include/tvm/tir/var.h b/include/tvm/tir/var.h index 98d560eee129e..c39b68d609eaf 100644 --- a/include/tvm/tir/var.h +++ b/include/tvm/tir/var.h @@ -293,8 +293,7 @@ class IterVarNode : public Object { hash_reduce(thread_tag); } - TVM_DLL static IterVar make(Range dom, Var var, IterVarType iter_type, - String thread_tag = ""); + TVM_DLL static IterVar make(Range dom, Var var, IterVarType iter_type, String thread_tag = ""); static constexpr const char* _type_key = "IterVar"; static constexpr const bool _type_has_method_sequal_reduce = true; diff --git a/src/target/llvm/codegen_cpu.cc b/src/target/llvm/codegen_cpu.cc index a6bbe0f4062e7..6c1c66f39cdc5 100644 --- a/src/target/llvm/codegen_cpu.cc +++ b/src/target/llvm/codegen_cpu.cc @@ -315,8 +315,8 @@ llvm::Value* CodeGenCPU::CreateCallExtern(const CallNode* op) { } else { llvm::Function* f = module_->getFunction(op->name.operator std::string()); if (f == nullptr) { - f = llvm::Function::Create(ftype, llvm::Function::ExternalLinkage, - op->name.operator std::string(), module_.get()); + f = llvm::Function::Create( + ftype, llvm::Function::ExternalLinkage, op->name.operator std::string(), module_.get()); } #if TVM_LLVM_VERSION >= 90 auto ext_callee = llvm::FunctionCallee(f); diff --git a/src/target/llvm/codegen_llvm.cc b/src/target/llvm/codegen_llvm.cc index c93aa3d1c84d5..1e42b04d763a0 100644 --- a/src/target/llvm/codegen_llvm.cc +++ b/src/target/llvm/codegen_llvm.cc @@ -664,8 +664,8 @@ llvm::Value* CodeGenLLVM::CreateCallExtern(const CallNode* op) { llvm::FunctionType::get(GetLLVMType(GetRef(op)), arg_type, false); llvm::Function* f = module_->getFunction(op->name.operator std::string()); if (f == nullptr) { - f = llvm::Function::Create(ftype, llvm::Function::ExternalLinkage, - op->name.operator std::string(), module_.get()); + f = llvm::Function::Create( + ftype, llvm::Function::ExternalLinkage, op->name.operator std::string(), module_.get()); } llvm::CallInst* call = builder_->CreateCall(f, arg_value); return call; diff --git a/src/tir/ir/buffer.cc b/src/tir/ir/buffer.cc index daa639d0e227b..520a6beef3b0d 100644 --- a/src/tir/ir/buffer.cc +++ b/src/tir/ir/buffer.cc @@ -384,8 +384,8 @@ PrimExpr Buffer::access_ptr(int access_mask, DataType ptr_type, int content_lane } Buffer BufferNode::make(Var data, DataType dtype, Array shape, Array strides, - PrimExpr elem_offset, String name, String scope, - int data_alignment, int offset_factor, BufferType buffer_type) { + PrimExpr elem_offset, String name, String scope,int data_alignment, + int offset_factor, BufferType buffer_type) { auto n = make_object(); n->data = std::move(data); n->dtype = dtype; diff --git a/src/tir/ir/data_layout.cc b/src/tir/ir/data_layout.cc index 296726bf335ba..d056a270d35fb 100644 --- a/src/tir/ir/data_layout.cc +++ b/src/tir/ir/data_layout.cc @@ -372,9 +372,9 @@ TVM_REGISTER_GLOBAL("tir.LayoutIndexOf").set_body_typed([](Layout layout, String }); TVM_REGISTER_GLOBAL("tir.LayoutFactorOf") - .set_body_typed([](Layout layout, String axis) -> int { - return layout.FactorOf(LayoutAxis::make(axis)); - }); +.set_body_typed([](Layout layout, String axis) -> int { + return layout.FactorOf(LayoutAxis::make(axis)); +}); TVM_REGISTER_GLOBAL("tir.LayoutNdim").set_body_typed([](Layout layout) -> int { return layout.ndim(); diff --git a/src/tir/transforms/inject_copy_intrin.cc b/src/tir/transforms/inject_copy_intrin.cc index 825e8615852f4..2c9f7c97b4a48 100644 --- a/src/tir/transforms/inject_copy_intrin.cc +++ b/src/tir/transforms/inject_copy_intrin.cc @@ -176,8 +176,7 @@ class CopyIntrinInjector : public StmtMutator { arith::Analyzer analyzer_; }; -Stmt InjectCopyIntrin(Stmt stmt, const String& pragma_key, - const PackedFunc& flower_copy_fromto) { +Stmt InjectCopyIntrin(Stmt stmt, const String& pragma_key, const PackedFunc& flower_copy_fromto) { return CopyIntrinInjector(pragma_key, flower_copy_fromto)(std::move(stmt)); }