-
Notifications
You must be signed in to change notification settings - Fork 201
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
Enable torch tracing by changing assertions in d2go forwards to allow for torch.fx.proxy.Proxy type. #241
Conversation
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 96f4389e5c6c6efd4790ce9c3f179e0544f3ff05
328698d
to
f41476d
Compare
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 09e516e3c098000dea63ddaf3907648bcae5a1b1
This pull request was exported from Phabricator. Differential Revision: D35518556 |
f41476d
to
9d2a676
Compare
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: ed234bf6e6b1c306ef9670ffbcb5ae00376e2d03
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 7feb77561f140825a66d46de93d5ae67b02288cb
This pull request was exported from Phabricator. Differential Revision: D35518556 |
9d2a676
to
d8c380b
Compare
… for torch.fx.proxy.Proxy type. Summary: Pull Request resolved: facebookresearch#4227 X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 7f1cc384a30d6f79772e68c28133e5420f966f06
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 539c8c0ccb39c3e2ba953ccda72103d847ad0667
d8c380b
to
e66fad7
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: b5d65165f271722af24e3dd9d33b3e37e4cf0e34
e66fad7
to
2dc70f9
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 524a3dbcb42736789580459bed2c9323b91a5615
2dc70f9
to
bb1d40a
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: Pull Request resolved: facebookresearch#4227 X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 82e6f1af479828176baba19bfa19a3272aca25af
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Differential Revision: D35518556 fbshipit-source-id: 8f5181fccf6cdd29ff2fea0d26385a65a08df76e
bb1d40a
to
1d4adac
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: c866f49a2be8d04bb6ed646ab07004cbdb582938
1d4adac
to
3a7e623
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: e8dbeb2538c2ce9042e5f1c481b30f48b3c8988f
3a7e623
to
cc05a7b
Compare
This pull request was exported from Phabricator. Differential Revision: D35518556 |
… for torch.fx.proxy.Proxy type. Summary: Pull Request resolved: #4227 X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: a9b5d3d580518ca74948544973ae89f8b9de3282
Summary:
Torch FX tracing propagates a type of
torch.fx.proxy.Proxy
through the graph.Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail.
This diff adds a helper function
is_fx_proxy()
, for checking fortorch.fx.proxy.Proxy
instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality.Differential Revision: D35518556