MCPcopy Create free account
hub / github.com/pytorch/executorch / WrapperModule

Class WrapperModule

codegen/tools/test/test_tools_selective_build.py:60–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 eager_module = ModuleAdd()
59
60 class WrapperModule(torch.nn.Module):
61 def __init__(self, fn):
62 super().__init__()
63 self.fn = fn
64
65 def forward(self, *args, **kwargs):
66 return self.fn(*args, **kwargs)
67
68 # Trace the test module and create a serialized ExecuTorch program.
69 inputs = (torch.ones(2, 2), torch.ones(2, 2))

Callers 1

create_programFunction · 0.70

Calls

no outgoing calls

Tested by 1

create_programFunction · 0.56