-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Relax][Frontend] PyTorch importer #95
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 tasks
spectrometerHBH
force-pushed
the
torch-importer
branch
3 times, most recently
from
January 14, 2023 20:00
ebb7915
to
269acc5
Compare
MasterJH5574
added a commit
that referenced
this pull request
Jan 16, 2023
Enhance VM Executable as a Subclass of runtime::Module
spectrometerHBH
force-pushed
the
torch-importer
branch
2 times, most recently
from
January 18, 2023 20:38
6be422e
to
8d8fd35
Compare
spectrometerHBH
force-pushed
the
torch-importer
branch
from
January 18, 2023 21:04
3bb56c0
to
46e6ca0
Compare
@Hzfengsy @jinhongyii would be great if you can help review |
Hzfengsy
reviewed
Jan 22, 2023
sunggg
reviewed
Jan 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for brining the Fx importer!
A few comments.
MasterJH5574
force-pushed
the
torch-importer
branch
from
January 27, 2023 19:22
0db4a08
to
cca3b07
Compare
MasterJH5574
force-pushed
the
torch-importer
branch
from
January 27, 2023 19:34
cca3b07
to
7e26d1c
Compare
sunggg
approved these changes
Jan 27, 2023
MasterJH5574
approved these changes
Jan 27, 2023
MasterJH5574
added a commit
that referenced
this pull request
Jan 28, 2023
Implements the Relax importer from PyTorch, using torch FX. An example use of the importer is: ```python # Import the importer. from tvm.relax.frontend import from_pytorch # Define the module 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) # Instantiate the model and create the input info dict. torch_model = MyModule() input_info = {"input_1": ((128, 10), "float32")} # Use the importer to import the PyTorch model to Relax. mod: tvm.IRModule = from_pytorch(torch_model, input_info) # Print out the imported model. # print(mod.script()) ``` --------- Co-authored-by: Ruihang Lai <[email protected]>
MasterJH5574
added a commit
that referenced
this pull request
Jan 31, 2023
Implements the Relax importer from PyTorch, using torch FX. An example use of the importer is: ```python # Import the importer. from tvm.relax.frontend import from_pytorch # Define the module 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) # Instantiate the model and create the input info dict. torch_model = MyModule() input_info = {"input_1": ((128, 10), "float32")} # Use the importer to import the PyTorch model to Relax. mod: tvm.IRModule = from_pytorch(torch_model, input_info) # Print out the imported model. # print(mod.script()) ``` --------- Co-authored-by: Ruihang Lai <[email protected]>
MasterJH5574
added a commit
that referenced
this pull request
Feb 8, 2023
Enhance VM Executable as a Subclass of runtime::Module
MasterJH5574
added a commit
that referenced
this pull request
Feb 8, 2023
Implements the Relax importer from PyTorch, using torch FX. An example use of the importer is: ```python # Import the importer. from tvm.relax.frontend import from_pytorch # Define the module 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) # Instantiate the model and create the input info dict. torch_model = MyModule() input_info = {"input_1": ((128, 10), "float32")} # Use the importer to import the PyTorch model to Relax. mod: tvm.IRModule = from_pytorch(torch_model, input_info) # Print out the imported model. # print(mod.script()) ``` --------- Co-authored-by: Ruihang Lai <[email protected]>
spectrometerHBH
pushed a commit
to spectrometerHBH/relax
that referenced
this pull request
Feb 9, 2023
Enhance VM Executable as a Subclass of runtime::Module
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the Relax importer from PyTorch, using torch FX.
An example use of the importer is: