torch-mlir/projects
Xinyu Yang ae4724763a
[Stablehlo] Enhance broadcast pattern in matmul Ops (#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))
```
2024-04-16 10:10:36 +08:00
..
jit_ir_common Additional information in error message (#2783) 2024-01-30 08:28:08 -08:00
ltc Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
onnx_c_importer build: find Protobuf using config mode search (#2900) 2024-02-12 17:31:41 -06:00
pt1 [Stablehlo] Enhance broadcast pattern in matmul Ops (#3161) 2024-04-16 10:10:36 +08:00
CMakeLists.txt [onnx] Add torch-mlir-import-onnx native port as an optional tool/library. (#2694) 2023-12-27 12:13:34 -08:00