Skip to content

Commit

Permalink
return empty dequantizationScales check
Browse files Browse the repository at this point in the history
  • Loading branch information
alvoron committed Nov 19, 2024
1 parent 39fcf09 commit 2e9a2a0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool ACLLowpFullyConnectedExecutor::supports(const FCConfig &config) {
VERIFY(checkPostOps(config.postOps), UNSUPPORTED_TYPE_OF_POSTOPS);
VERIFY(one_of(srcRank(config), 2U, 3U, 4U), UNSUPPORTED_SRC_RANK);
VERIFY(one_of(weiRank(config), 2U, 3U, 4U), UNSUPPORTED_WEI_RANK);
VERIFY(static_cast<FCAttrs>(config.attrs).dequantizationScales.size() == 1, UNSUPPORTED_PER_CHANNEL_QUANTIZATION);
VERIFY(static_cast<FCAttrs>(config.attrs).dequantizationScales.size() <= 1, UNSUPPORTED_PER_CHANNEL_QUANTIZATION);
return true;
}

Expand All @@ -82,7 +82,11 @@ void ACLLowpFullyConnectedExecutor::updateTensorsShapes(ACLShapes& aclMemoryShap

arm_compute::Status ACLLowpFullyConnectedExecutor::validateTensorsInfo(const ACLInfos & aclMemoryInfos) {
auto &tensor_info = aclMemoryInfos[ACLArgs::ACL_SRC_0];
tensor_info->set_quantization_info(arm_compute::QuantizationInfo(dequantizationScales[0]));
if (dequantizationScales.empty()) {
tensor_info->set_quantization_info(arm_compute::QuantizationInfo(1.f));
} else {
tensor_info->set_quantization_info(arm_compute::QuantizationInfo(dequantizationScales[0]));
}

auto& tensor_info_weights = aclMemoryInfos[ACLArgs::ACL_WEI];
tensor_info_weights->set_quantization_info(arm_compute::QuantizationInfo(1.f));
Expand Down

0 comments on commit 2e9a2a0

Please sign in to comment.