Skip to content

Commit

Permalink
[torch-frontend] update torch-mlir (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyunqu authored Oct 10, 2024
1 parent 66a95a3 commit 5b9a49e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ def test_nonzero():

# ==============================================================================

class ViewDtypeModule(torch.nn.Module):
def forward(self, x):
return x.view(torch.int8)

def test_view_dtype():
inputs = (torch.rand(4, 5),)
prog = torch.export.export(ViewDtypeModule(), inputs)
print(prog)
module = compile_dynamo_model(prog, "raw") # note: torch2.1 export has bug on view.dtype
print(module.operation.get_asm())

# ==============================================================================

class MLPModule(torch.nn.Module):
def __init__(self):
super().__init__()
Expand All @@ -48,6 +61,4 @@ def test_mlp():
assert "dense_resource" not in mlir_str

if __name__ == "__main__":
test_slice()
test_nonzero()
test_mlp()
test_view_dtype()
2 changes: 1 addition & 1 deletion frontends/torch-frontend/torch-frontend/python/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.6
1.2.7+rc1

0 comments on commit 5b9a49e

Please sign in to comment.