From fcbac92b631c255b6c8d2597c598e7fd54a04f5e Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Sun, 6 Oct 2024 09:41:51 +1000 Subject: [PATCH] Fix warning when building on Windows --- .../core/providers/coreml/builders/impl/unary_op_builder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));