fix missing-prototypes warnings in torch_cpu (Part 4) (#100849)

This PR fixes more missing-prototypes violations in the torch_cpu source following PRs #100053, #100147 and #100245

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100849
Approved by: https://github.com/albanD
This commit is contained in:
cyy
2023-05-18 03:49:40 +00:00
committed by PyTorch MergeBot
parent 900ca4df59
commit c2f28d1c1d
137 changed files with 572 additions and 773 deletions

View File

@ -282,7 +282,7 @@ QuantFusionInfo getObservedQParamOpFusionInfo(
} // namespace
std::vector<QuantFusionInfo> quant_fusion_pattern_and_replacements() {
static std::vector<QuantFusionInfo> quant_fusion_pattern_and_replacements() {
// aten::conv1d
std::string conv1d = R"(
graph(%a_quant, %packed_params, %r_scale, %r_zero_point, %r_dtype, %stride, %padding, %dilation, %groups):
@ -1105,7 +1105,8 @@ graph(%packed_params, %a):
};
}
std::vector<QuantFusionInfo> dynamic_quant_fusion_pattern_and_replacements() {
static std::vector<QuantFusionInfo>
dynamic_quant_fusion_pattern_and_replacements() {
std::string linear_dynamic = R"(
graph(%packed_params, %a, %reduce_range, %a_dtype):
%a_scale : float, %a_zero_point : int = aten::_choose_qparams_per_tensor(%a, %reduce_range)
@ -1142,7 +1143,7 @@ graph(%packed_params, %a):
};
}
std::vector<QuantFusionInfo> linear_prepack_unpack_patterns() {
static std::vector<QuantFusionInfo> linear_prepack_unpack_patterns() {
std::string linear_with_quant = R"(
graph(%a_dequant, %w_quant, %b):
%w_dequant = aten::dequantize(%w_quant)
@ -1178,7 +1179,7 @@ graph(%w, %a_dq, %b):
};
}
std::vector<QuantFusionInfo> conv_prepack_unpack_patterns() {
static std::vector<QuantFusionInfo> conv_prepack_unpack_patterns() {
std::string conv1d_with_quant = R"(
graph(%a_dequant, %w_quant, %b, %stride, %padding, %dilation, %groups):
%w_dequant = aten::dequantize(%w_quant)