lhutton1 commented on code in PR #13997:
URL: https://github.com/apache/tvm/pull/13997#discussion_r1111659042
##########
src/relay/op/contrib/ethosu/pooling.cc:
##########
@@ -46,14 +46,27 @@ bool EthosuPoolingRel(const Array<Type>& types, int
num_inputs, const Attrs& att
const String operator_name = "ethosu_pooling";
- if (param->pooling_type != "AVG" && param->pooling_type != "MAX") {
+ if (param->pooling_type != "AVG" && param->pooling_type != "MAX" &&
+ param->pooling_type != "SUM") {
reporter->GetDiagCtx().EmitFatal(Diagnostic::Error(reporter->GetSpan())
<< "Invalid operator: expected " <<
operator_name
- << " type 'AVG' or 'MAX' but was " <<
param->pooling_type);
+ << " type 'AVG', 'MAX', or 'SUM' but was "
+ << param->pooling_type);
return false;
}
- CheckDataType(reporter, ifm->dtype, {DataType::UInt(8), DataType::Int(8)},
operator_name, "ifm",
+ auto max_avg_pooling_ifm_dtypes = {DataType::UInt(8), DataType::Int(8)};
+ auto sum_pooling_ifm_dtypes = {DataType::UInt(8), DataType::Int(8),
DataType::Int(16),
Review Comment:
I think it's okay to use `std::initializer_list<DataType>` in this instance
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]