Skip to content

Commit e05fa9d

Browse files
committed
Update on "[ONNX] Support quantized::conv1d_relu"
[ghstack-poisoned]
1 parent 37fd9d9 commit e05fa9d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

torch/csrc/jit/passes/onnx/unpack_quantized_weights.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ void unpackQuantizedWeightsHelper(
416416
groups = groups_int;
417417
transpose = transpose_int;
418418
} else if (
419-
(params_type == QuantizedParamsType::CONV || params_type == QuantizedParamsType::CONV1D) &&
419+
(params_type == QuantizedParamsType::CONV ||
420+
params_type == QuantizedParamsType::CONV1D) &&
420421
ser_tup->elements()[0].isString()) {
421422
const auto& elements = ser_tup->elements();
422423
auto version = elements[0].toStringRef();
@@ -452,7 +453,8 @@ void unpackQuantizedWeightsHelper(
452453
}
453454
for (const auto i : c10::irange(kSpatialDim)) {
454455
if (params_type != QuantizedParamsType::CONV1D || i != 0) {
455-
output_padding_int.emplace_back(conv_params_packed[idx].item<int64_t>());
456+
output_padding_int.emplace_back(
457+
conv_params_packed[idx].item<int64_t>());
456458
}
457459
idx++;
458460
}
@@ -650,7 +652,7 @@ void UnpackQuantizedWeights(
650652
graph(%input, %packed_weight, %w_scale, %w_zero_point):
651653
%r = quantized::linear(%input, %packed_weight, %w_scale, %w_zero_point)
652654
return (%r) )";
653-
std::string qconv1d_relu = R"(
655+
std::string qconv1d_relu = R"(
654656
graph(%input, %packed_params, %scale, %zero_point):
655657
%r = quantized::conv1d_relu(%input, %packed_params, %scale, %zero_point)
656658
return (%r) )";

0 commit comments

Comments
 (0)