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