sunggg opened a new pull request, #14481: URL: https://github.com/apache/tvm/pull/14481
Currently, `relax.op.take` implements semantics of [torch.take](https://pytorch.org/docs/stable/generated/torch.take.html) which has a stronger restriction than its backing `topi.take` which seems to follow the semantics of [numpy.take](https://numpy.org/doc/stable/reference/generated/numpy.take.html). i.e., `relax.op.take` enforces its input `indices` to be 1-d tensor. To match its behavior with `topi.take`, this PR extends the semantics of `relax.op.take` by removing such restriction without breaking existing test cases (except one for checking 1-d tensor restriction). As a result, this PR can support [onnx.gather](https://github.com/onnx/onnx/blob/main/docs/Changelog.md#Gather-13) which was the main motivation of my previous PR https://github.com/apache/tvm/pull/14457 by resolving the problem in my previous stab. cc. @jwfromm @yongwww @MasterJH5574 -- 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]
