pytorch
8880f3d4 - [fx] introduce `__fx_create_arg__` dunder method for controlling custom classes are handled as node args (#61780)

Commit
3 years ago
[fx] introduce `__fx_create_arg__` dunder method for controlling custom classes are handled as node args (#61780) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61780 These changes would allow objects to control how they are handled when they are an argument to a torch.fx call_module node from within their source. Previously, we have been using a custom Tracer with an overridden create_arg() method and branching based on class name to handle args that are unusual (data classes, etc). Reviewed By: suo, houseroad Differential Revision: D27976120 fbshipit-source-id: 0c5249c5f8398368ca0fbec0ad8a07ccf99b7da4
Author
Parents
Loading