-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[fx2trt] support for ne, logical_not, logical_and #75444
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
Conversation
Summary: as titled 1. support logical_and, logical_not 2. replace eq,gt,lt with python operator in acc_ops due to the fact that torch op needs input to be torch.Tensor but python op does not 3. add more test cases 4. add individual ne op without using combination of existing ops since there are limitations. For ex, in lowering it to equal+logical_not. It will fail the last test case in test_ne.py. The failure reason is that logical_not needs the input to be a tensor. Also we can not use equal+operator.not since not is not tracable in FX with the error "symbolically traced variables cannot be used as inputs to control flow" We also can not use equal+operator.invert since operator.invert(True)=-2 Test Plan: buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_ne buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_logical_and buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_unary_ops Reviewed By: 842974287 Differential Revision: D35232917 fbshipit-source-id: 60368a6f73071403394a369ed94e319a9dd86c29
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 51e9ec3 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
This pull request was exported from Phabricator. Differential Revision: D35232917 |
Summary: Pull Request resolved: #75444 as titled 1. support logical_and, logical_not 2. replace eq,gt,lt with python operator in acc_ops due to the fact that torch op needs input to be torch.Tensor but python op does not 3. add more test cases 4. add individual ne op without using combination of existing ops since there are limitations. For ex, in lowering it to equal+logical_not. It will fail the last test case in test_ne.py. The failure reason is that logical_not needs the input to be a tensor. Also we can not use equal+operator.not since not is not tracable in FX with the error "symbolically traced variables cannot be used as inputs to control flow" We also can not use equal+operator.invert since operator.invert(True)=-2 (Note: this ignores all push blocking failures!) Test Plan: buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_ne buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_logical_and buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_unary_ops Reviewed By: 842974287 Differential Revision: D35232917 fbshipit-source-id: d4601a6883c977caa263f67b9db86cbc862d4780
|
Hey @frank-wei. |
Summary: X-link: pytorch/pytorch#75444 as titled 1. support logical_and, logical_not 2. replace eq,gt,lt with python operator in acc_ops due to the fact that torch op needs input to be torch.Tensor but python op does not 3. add more test cases 4. add individual ne op without using combination of existing ops since there are limitations. For ex, in lowering it to equal+logical_not. It will fail the last test case in test_ne.py. The failure reason is that logical_not needs the input to be a tensor. Also we can not use equal+operator.not since not is not tracable in FX with the error "symbolically traced variables cannot be used as inputs to control flow" We also can not use equal+operator.invert since operator.invert(True)=-2 (Note: this ignores all push blocking failures!) Reviewed By: 842974287 Differential Revision: D35232917 fbshipit-source-id: d4601a6883c977caa263f67b9db86cbc862d4780
Summary:
as titled
Also we can not use equal+operator.not since not is not tracable in FX with the error "symbolically traced variables cannot be used as inputs to control flow"
We also can not use equal+operator.invert since operator.invert(True)=-2
Test Plan:
buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_ne
buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_logical_and
buck test mode/dev-nosan deeplearning/trt/fx2trt_oss/test/converters:test_unary_ops
Reviewed By: 842974287
Differential Revision: D35232917