diff --git a/onnxruntime/core/providers/coreml/builders/impl/unary_op_builder.cc b/onnxruntime/core/providers/coreml/builders/impl/unary_op_builder.cc index 335ca737081b2..a6580920343c4 100644 --- a/onnxruntime/core/providers/coreml/builders/impl/unary_op_builder.cc +++ b/onnxruntime/core/providers/coreml/builders/impl/unary_op_builder.cc @@ -40,7 +40,7 @@ Status UnaryOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder, const std::unique_ptr op = model_builder.CreateOperation(node, coreml_op_type); AddOperationInput(*op, "x", input_defs[0]->Name()); if (op_type == "Reciprocal") { - float epsilon = 1e-4; // epsilon: const T (Optional, default=1e-4) + float epsilon = 1e-4f; // epsilon: const T (Optional, default=1e-4) auto dtype = node.InputDefs()[0]->TypeAsProto()->tensor_type().elem_type(); if (dtype == ONNX_NAMESPACE::TensorProto_DataType_FLOAT) { AddOperationInput(*op, "epsilon", model_builder.AddScalarConstant(op->type(), "epsilon", epsilon));