"docs/zh_CN/SklearnExamples.md" did not exist on "df4f05c78a5cc3fd3dc5f9929bf35df414a2fff6"
Commit cbbd73a6 authored by Paul's avatar Paul
Browse files

Fix tidy warnings

parent 44cc8115
...@@ -54,7 +54,7 @@ struct unary_device : oper<Derived> ...@@ -54,7 +54,7 @@ struct unary_device : oper<Derived>
return args[1]; return args[1];
} }
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
template <class Derived, void (*F)(hipStream_t, const argument&, const argument&, const argument&)> template <class Derived, void (*F)(hipStream_t, const argument&, const argument&, const argument&)>
...@@ -72,7 +72,7 @@ struct binary_device : oper<Derived> ...@@ -72,7 +72,7 @@ struct binary_device : oper<Derived>
return args[2]; return args[2];
} }
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -18,7 +18,7 @@ struct hip_pad ...@@ -18,7 +18,7 @@ struct hip_pad
shape compute_shape(std::vector<shape> inputs) const; shape compute_shape(std::vector<shape> inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -20,7 +20,7 @@ struct miopen_pooling ...@@ -20,7 +20,7 @@ struct miopen_pooling
shape compute_shape(const std::vector<shape>& inputs) const; shape compute_shape(const std::vector<shape>& inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -17,7 +17,7 @@ struct miopen_relu ...@@ -17,7 +17,7 @@ struct miopen_relu
shape compute_shape(const std::vector<shape>& inputs) const; shape compute_shape(const std::vector<shape>& inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -17,7 +17,7 @@ struct miopen_sigmoid ...@@ -17,7 +17,7 @@ struct miopen_sigmoid
shape compute_shape(const std::vector<shape>& inputs) const; shape compute_shape(const std::vector<shape>& inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -17,7 +17,7 @@ struct miopen_softmax ...@@ -17,7 +17,7 @@ struct miopen_softmax
shape compute_shape(const std::vector<shape>& inputs) const; shape compute_shape(const std::vector<shape>& inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -17,7 +17,7 @@ struct miopen_tanh ...@@ -17,7 +17,7 @@ struct miopen_tanh
shape compute_shape(const std::vector<shape>& inputs) const; shape compute_shape(const std::vector<shape>& inputs) const;
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const; compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; } std::ptrdiff_t output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
}; };
} // namespace gpu } // namespace gpu
......
...@@ -153,7 +153,7 @@ struct tf_parser ...@@ -153,7 +153,7 @@ struct tf_parser
template <class T> template <class T>
void add_binary_op(std::string name, T x) void add_binary_op(std::string name, T x)
{ {
add_op(name, [this, x](attribute_map attributes, std::vector<instruction_ref> args) { add_op(name, [this, x](const attribute_map& attributes, std::vector<instruction_ref> args) {
if(args.size() != 2) if(args.size() != 2)
MIGRAPHX_THROW("binary operators should have 2 operands"); MIGRAPHX_THROW("binary operators should have 2 operands");
auto l0 = args[1]; auto l0 = args[1];
...@@ -215,7 +215,7 @@ struct tf_parser ...@@ -215,7 +215,7 @@ struct tf_parser
template <class T> template <class T>
void add_generic_op(std::string name, T x) void add_generic_op(std::string name, T x)
{ {
add_op(name, [this, x](attribute_map, std::vector<instruction_ref> args) { add_op(name, [this, x](const attribute_map&, std::vector<instruction_ref> args) {
return prog.add_instruction(x, args); return prog.add_instruction(x, args);
}); });
} }
...@@ -906,7 +906,7 @@ struct tf_parser ...@@ -906,7 +906,7 @@ struct tf_parser
std::transform(input_dims.begin(), std::transform(input_dims.begin(),
input_dims.end(), input_dims.end(),
std::back_inserter(dims), std::back_inserter(dims),
[](tensorflow::TensorShapeProto_Dim dim) { return dim.size(); }); [](const tensorflow::TensorShapeProto_Dim& dim) { return dim.size(); });
return dims; return dims;
} }
......
...@@ -49,7 +49,7 @@ struct operation ...@@ -49,7 +49,7 @@ struct operation
argument compute(context& ctx, const shape& output, const std::vector<argument>& input) const; argument compute(context& ctx, const shape& output, const std::vector<argument>& input) const;
/// An optional method to return which argument the output will alias. If /// An optional method to return which argument the output will alias. If
/// there is no aliased output then -1 can be returned. /// there is no aliased output then -1 can be returned.
int output_alias(const std::vector<shape>& input) const; std::ptrdiff_t output_alias(const std::vector<shape>& input) const;
/// An optional stream operator to print the operation. When this is not /// An optional stream operator to print the operation. When this is not
/// implemented, it will just print the operation's name. /// implemented, it will just print the operation's name.
friend std::ostream& operator<<(std::ostream& os, const operation& op); friend std::ostream& operator<<(std::ostream& os, const operation& op);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment