masahi commented on pull request #9152:
URL: https://github.com/apache/tvm/pull/9152#issuecomment-983085744


   This is not about a limitation of BYOC. Originally you said "qnn.conv2d 
semantic already provides a proper handling of pad with non trivial zero 
point:" but this is not enforced for BYOC cases when this lowering code is not 
used. 
   
   I think the explicit padding makes the requirement of pad by zero point 
clearer. Actually QNN didn't properly pad with a zero point until someone 
pointed out this bug. So I believe it is better to make this requirement 
obvious rather than relying on each BYOC backend to properly handle pad by zero 
point.
   
   For your purpose, there is already a pass that folds pad with conv2d 
https://github.com/apache/tvm/blob/78657e1f8b2c97c3acc389e2b757c6ac8174388d/src/relay/transforms/fold_explicit_padding.cc#L41.
 You can extend that pass to handle `qnn.conv2d`.


-- 
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]


Reply via email to