-
Notifications
You must be signed in to change notification settings - Fork 56
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
[torchlib] Implement various upsample functions #1159
Comments
How are we validating this works e2e for pytorch export? I think there might be an issue inside pytorch that decompositions are forced for these ops, similar to the einsum situation. pytorch/pytorch#116684 |
Why is |
Regarding Resize.nearest_mode. In torchscript exporter it was set to "floor". In torchlib it is left as default "round_prefer_floor" Is the change intentional? |
We do need to implement them and match the behaviors @xiaowuhu please correct me if I’m missing anything |
Fixes #1159 (comment) which indeed turns out to be a problem uncovered by PyTorch CI https://github.com/pytorch/pytorch/actions/runs/7508784822/job/20445196351?pr=117314. > Fixes `align_corner` default value. The default value from pytorch signature is `False` https://pytorch.org/docs/stable/generated/torch.nn.Upsample.html#torch.nn.Upsample. > That said, it shouldn't matter since `align_corner` in aten signature in `native_functions.yaml` is a required argument, so in practice this function will never be invoked w/o `align_corner`. Above is outdated. The case is more complicated. #1254 (comment). In short this PR fixes the torchlib op signature to match with aten spec, and updates input wrangler for test case to bridge from sample test inputs for function `torch.nn.functional.upsample_bilinear`. --------- Co-authored-by: Justin Chu <[email protected]>
Reference:
onnxscript/onnxscript/function_libs/torch_lib/ops/nn.py
Lines 2121 to 2137 in 24d77d9
The text was updated successfully, but these errors were encountered: