diff --git a/onnxruntime/core/codegen/passes/op_ir_creator/tvm_ir_builder.cc b/onnxruntime/core/codegen/passes/op_ir_creator/tvm_ir_builder.cc index a50d1ee3f3..2fe8927978 100644 --- a/onnxruntime/core/codegen/passes/op_ir_creator/tvm_ir_builder.cc +++ b/onnxruntime/core/codegen/passes/op_ir_creator/tvm_ir_builder.cc @@ -70,7 +70,7 @@ Status TVMIRBuilder::Evaluate( // BEGIN: Generic IR creator classes #define ADD_OP_ITEM(name) \ - op_ir_registry->Register(std::move(onnxruntime::make_unique())); + op_ir_registry->Register(onnxruntime::make_unique()); #define BINARY_OP(name) ADD_OP_ITEM(name) #define BINARY_CMP_OP(name) ADD_OP_ITEM(name) diff --git a/onnxruntime/core/codegen/passes/weight_layout/weight_layout.cc b/onnxruntime/core/codegen/passes/weight_layout/weight_layout.cc index 207b5c6efc..7cbb5692f7 100644 --- a/onnxruntime/core/codegen/passes/weight_layout/weight_layout.cc +++ b/onnxruntime/core/codegen/passes/weight_layout/weight_layout.cc @@ -31,12 +31,11 @@ const std::string WeightLayout::GetKey( ONNX_NAMESPACE::TensorProto_DataType proto_type, int input_dim, float pad_zero) { - std::string key = name; - key += "_type_" + std::to_string(static_cast(proto_type)); - key += "_dim_" + input_dim; - key += "_pad_zero_" + std::to_string(pad_zero); - key = NormalizeCppName(key); - return key; + std::ostringstream key(name); + key << "_type_" << static_cast(proto_type); + key << "_dim_" << input_dim; + key << "_pad_zero_" << pad_zero; + return NormalizeCppName(key.str()); } WeightLayout::WeightLayout( diff --git a/onnxruntime/test/tvm/tvm_basic_test.cc b/onnxruntime/test/tvm/tvm_basic_test.cc index 0b9d338d0d..70399f2f03 100644 --- a/onnxruntime/test/tvm/tvm_basic_test.cc +++ b/onnxruntime/test/tvm/tvm_basic_test.cc @@ -150,7 +150,7 @@ class FuseExecutionProviderX : public CPUExecutionProvider { onnxruntime::make_unique(std::move(sub_graph))); } } - return std::move(result); + return result; } common::Status Compile(const std::vector& fused_nodes, diff --git a/onnxruntime/test/tvm/tvm_demo/demo_compiler.cc b/onnxruntime/test/tvm/tvm_demo/demo_compiler.cc index 886ecc9e1a..15ca50f666 100644 --- a/onnxruntime/test/tvm/tvm_demo/demo_compiler.cc +++ b/onnxruntime/test/tvm/tvm_demo/demo_compiler.cc @@ -110,7 +110,7 @@ bool TVM_SCHEDULER_CLASS(AlwaysInline, DemoTVM)::Evaluate( // Register the always inline Scheduler to sched_registry static void RegisterAlwaysInlineScheduler(tvm_codegen::TVMScheduleRegistry* sched_registry) { sched_registry->Register( - std::move(onnxruntime::make_unique())); + onnxruntime::make_unique()); } // Declare a schedule dispatcher that always dispatches the always inline Scheduler