forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Stablehlo] Enhance broadcast pattern in matmul Ops (llvm#3161)
To pass test "MatmulStaticBroadcast_basic" in stablehlo: ```python class MatmulStaticBroadcast(torch.nn.Module): def __init__(self): super().__init__() @export @annotate_args([ None, ([4, 1, 6, 7], torch.float32, True), ([8, 1, 5, 7, 6], torch.float32, True), ]) def forward(self, lhs, rhs): return torch.matmul(lhs, rhs) @register_test_case(module_factory=lambda: MatmulStaticBroadcast()) def MatmulStaticBroadcast_basic(module, tu: TestUtils): module.forward(tu.rand(4, 1, 6, 7), tu.rand(8, 1, 5, 7, 6)) ```
- Loading branch information
Xinyu Yang
authored
Apr 16, 2024
1 parent
5e564b5
commit ae47247
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
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