(A, B)
| 93 | profiler = kernel.get_profiler() |
| 94 | |
| 95 | def ref_program(A, B): |
| 96 | import torch |
| 97 | |
| 98 | if trans_A: |
| 99 | A = A.transpose(-1, -2) |
| 100 | if trans_B: |
| 101 | B = B.transpose(-1, -2) |
| 102 | if in_dtype == T.float32: |
| 103 | # Convert float32 to tfloat32 because tfloat32 mma cannot truncate |
| 104 | # float32 automatically, -0x1000 meas |
| 105 | A = (A.contiguous().view(torch.int32) - 0x1000).view(torch.float32) |
| 106 | B = (B.contiguous().view(torch.int32) - 0x1000).view(torch.float32) |
| 107 | C = torch.matmul(A.to(torch.float), B.to(torch.float)) |
| 108 | C = C.to(torch.__getattribute__(out_dtype)) |
| 109 | return C |
| 110 | |
| 111 | profiler.assert_allclose(ref_program, atol=1e-2, rtol=1e-2) |
| 112 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…