Tiny fix to codegen

This commit is contained in:
Changming Sun 2019-11-13 15:59:16 -08:00
parent b42cb61904
commit da03ed4473
4 changed files with 8 additions and 9 deletions

View file

@ -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<GENERIC_OP_IR_CREATOR_CLASS(name)>()));
op_ir_registry->Register(onnxruntime::make_unique<GENERIC_OP_IR_CREATOR_CLASS(name)>());
#define BINARY_OP(name) ADD_OP_ITEM(name)
#define BINARY_CMP_OP(name) ADD_OP_ITEM(name)

View file

@ -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<int>(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<int>(proto_type);
key << "_dim_" << input_dim;
key << "_pad_zero_" << pad_zero;
return NormalizeCppName(key.str());
}
WeightLayout::WeightLayout(

View file

@ -150,7 +150,7 @@ class FuseExecutionProviderX : public CPUExecutionProvider {
onnxruntime::make_unique<ComputeCapability>(std::move(sub_graph)));
}
}
return std::move(result);
return result;
}
common::Status Compile(const std::vector<onnxruntime::Node*>& fused_nodes,

View file

@ -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<TVM_SCHEDULER_CLASS(AlwaysInline, DemoTVM)>()));
onnxruntime::make_unique<TVM_SCHEDULER_CLASS(AlwaysInline, DemoTVM)>());
}
// Declare a schedule dispatcher that always dispatches the always inline Scheduler