-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from opencompl/sasha/alexnet
generate alexnet linalg
- Loading branch information
Showing
6 changed files
with
1,132 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shark-turbine | ||
torchvision |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Script that generated the mlir files in this folder | ||
|
||
python test.py > iree.mlir | ||
iree-compile --iree-input-type=torch --compile-to=input iree.mlir > input.mlir | ||
iree-compile --iree-input-type=torch --compile-to=flow --iree-util-zero-fill-elided-attrs iree.mlir > flow.mlir |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import torch | ||
import torch.nn as nn | ||
|
||
import shark_turbine.aot as aot | ||
from iree.compiler import compile_str | ||
|
||
from torchvision.models import AlexNet | ||
|
||
model = AlexNet() | ||
example_x = torch.empty(64, 3, 224, 224) | ||
exported = aot.export(model, example_x) | ||
exported.print_readable() |