Extended tracer and wrap of torch.fx.
This file defines a inherit tracer of torch.fx.Tracer and a extended wrap to allow wrapping of user-defined Module or method, which help users do some optimization of their own module by torch.fx
Extend torch.fx.wrap.
This function can be: : 1) called or used as a decorator on a string to register a builtin function as a “leaf function” 2) called or used as a decorator on a function to register this function as a “leaf function” 3) called or used as a decorator on subclass of torch.nn.Module to register this module as a “leaf module”, and register all user defined method in this class as “leaf method” 4) called or used as a decorator on a class method to register it as “leaf method”