Skip to content

Commit

Permalink
Fix warning when building on Windows (#22327)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->
Specify type to fix warning


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
  • Loading branch information
skottmckay authored Oct 6, 2024
1 parent 5036e63 commit 280c013
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Status UnaryOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder, const
std::unique_ptr<Operation> 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));
Expand Down

0 comments on commit 280c013

Please sign in to comment.