(a, b)
| 684 | |
| 685 | |
| 686 | def torch_matmul(a, b): |
| 687 | M, K = a.shape |
| 688 | N, K = b.shape |
| 689 | bytes_per_elem = a.element_size() |
| 690 | flops_str = f"flops{bytes_per_elem * 8}" |
| 691 | with proton.scope( |
| 692 | f"torch [M={M}, N={N}, K={K}]", |
| 693 | {"bytes": bytes_per_elem * (M * K + N * K + M * N), flops_str: 2.0 * M * N * K}, |
| 694 | ): |
| 695 | c = torch.matmul(a, b.T) |
| 696 | return c |
| 697 | |
| 698 | |
| 699 | def torch_matmul_nontransposed(a, b): |
nothing calls this directly
no outgoing calls
no test coverage detected