Skip to content

Support aten::div.Tensor_mode #980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
titaiwangms opened this issue Aug 5, 2023 · 1 comment · Fixed by #988
Closed

Support aten::div.Tensor_mode #980

titaiwangms opened this issue Aug 5, 2023 · 1 comment · Fixed by #988
Assignees
Labels
contribution welcome We welcome code contributions for this module: torchlib Related to the torch/aten function lib in development

Comments

@titaiwangms
Copy link
Contributor

Essentially, rounding_mode attribute support.
I think this op blocks multiple models from torchbench.

cc @BowenBao @xiaowuhu @justinchuby

@titaiwangms titaiwangms added the module: torchlib Related to the torch/aten function lib in development label Aug 5, 2023
@titaiwangms
Copy link
Contributor Author

Feel free to close it and categorize this issue under others, if there is any.

@justinchuby justinchuby added the contribution welcome We welcome code contributions for this label Aug 5, 2023
justinchuby added a commit that referenced this issue Aug 8, 2023
`aten::div.Tensor_mode` is implemented with two ONNX functions. When
`rounding_mode` is `None`, we use `aten_div`. When it is not None, we
use `aten_div_mode`. This way we don't need to handle when
`rounding_mode==None` in `aten_div`.

For `float16` inputs we need to cast to float32 to preserve precision.
Otherwise `-inf` sometimes becomes `inf` in the output.

- Additionally registers aliases "aten::divide", "aten::true_divide" to
`aten_div`.
- Supports saving mismatches to error reports
- xfail and documents off-by-one errors with float16
(#990,
#989)

Fixes #980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome We welcome code contributions for this module: torchlib Related to the torch/aten function lib in development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants