Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

[Relax][frontend] torch fx importer #419

Merged
merged 4 commits into from
Feb 10, 2023

Commits on Feb 9, 2023

  1. [Relax][frontend] torch fx importer

    Implements the Relax importer from PyTorch, using torch FX.
    
    An example use of the importer is:
    
    ```python
    from tvm.relax.frontend import from_pytorch
    
    class MyModule(torch.nn.Module):
        def __init__(self):
            super().__init__()
            self.linear = torch.nn.Linear(in_features=10, out_features=7, bias=True)
    
        def forward(self, input):
            return self.linear(input)
    
    torch_model = MyModule()
    input_info = {"input_1": ((128, 10), "float32")}
    
    mod: tvm.IRModule = from_pytorch(torch_model, input_info)
    
    ```
    
    ---------
    
    Co-authored-by: Ruihang Lai <[email protected]>
    spectrometerHBH and MasterJH5574 committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    93c8329 View commit details
    Browse the repository at this point in the history
  2. .

    spectrometerHBH committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    de522bb View commit details
    Browse the repository at this point in the history
  3. .

    spectrometerHBH committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    5eea2e6 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. .

    spectrometerHBH committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    bde40ca View commit details
    Browse the repository at this point in the history