leandron commented on code in PR #10915: URL: https://github.com/apache/tvm/pull/10915#discussion_r866673240
########## src/relay/qnn/op/convolution.cc: ########## @@ -50,12 +50,15 @@ bool QnnConv2DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs, if (data == nullptr || weight == nullptr) return false; const auto* param = attrs.as<Conv2DAttrs>(); ICHECK(param != nullptr) << "Conv2DAttrs cannot be nullptr."; - ICHECK(data->dtype == DataType::Int(8) || data->dtype == DataType::UInt(8)) - << "Expected qnn conv2d type(int8, uint8) for input but was " << data->dtype; - ICHECK(weight->dtype == DataType::Int(8) || weight->dtype == DataType::UInt(8)) - << "Expected qnn conv2d type(int8, uint8) for weight but was " << weight->dtype; - ICHECK(param->out_dtype == DataType::Int(16) || param->out_dtype == DataType::Int(32)) - << "Expected qnn conv2d type(int32, int16) for output but was " << param->out_dtype; + ICHECK(data->dtype == DataType::Int(8) || data->dtype == DataType::UInt(8) || + data->dtype == DataType::Int(16)) + << "Expected qnn conv2d type(int8, uint8, int16) for input but was " << data->dtype; Review Comment: To keep the current behaviour I limited in t a minimum of 32 bits for the existing cases, and for cases that we expect the output to be more than 32 (for example in TFLite when we adjust outputs to be 64 bits), that it will grow accordingly. Can you have another look and see whether it is looks ok now? -- 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]
