altanh opened a new pull request #6827: URL: https://github.com/apache/incubator-tvm/pull/6827
The first-order AD currently incorrectly deals with functions with tuple arguments, in particular by trying to add tuples when summing the gradients. Notably, this causes errors in the gradients of functions like `stack` which take a tuple of tensors. This PR lifts addition to work on the tuples (which was already done by the higher-order AD). However, higher-order AD currently does not support tuples in the top-level function, and I added an xfail test to show this. I'm not sure how hard it is to change the higher-order code to support tuples at the top-level, so maybe someone else can take a look. cc @MarisaKirisame @t-vi ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org