|
6 | 6 | import torch |
7 | 7 |
|
8 | 8 | import flag_gems |
| 9 | +from flag_gems import fused, ops |
9 | 10 |
|
10 | 11 | from .accuracy_utils import ( |
11 | 12 | FLOAT_DTYPES, |
@@ -143,7 +144,7 @@ def test_accuracy_baddbmm(M, N, K, scalar, dtype): |
143 | 144 | alpha = beta = scalar |
144 | 145 |
|
145 | 146 | ref_out = torch.baddbmm(ref_bias, ref_mat1, ref_mat2, alpha=alpha, beta=beta) |
146 | | - res_out = flag_gems.baddbmm(bias, mat1, mat2, alpha=alpha, beta=beta) |
| 147 | + res_out = ops.baddbmm(bias, mat1, mat2, alpha=alpha, beta=beta) |
147 | 148 |
|
148 | 149 | gems_assert_close(res_out, ref_out, dtype, reduce_dim=K) |
149 | 150 |
|
@@ -174,7 +175,7 @@ def test_accuracy_baddbmm_backward(M, N, K, scalar, dtype): |
174 | 175 | alpha = beta = scalar |
175 | 176 |
|
176 | 177 | ref_out = torch.baddbmm(ref_bias, ref_mat1, ref_mat2, alpha=alpha, beta=beta) |
177 | | - res_out = flag_gems.baddbmm(bias, mat1, mat2, alpha=alpha, beta=beta) |
| 178 | + res_out = ops.baddbmm(bias, mat1, mat2, alpha=alpha, beta=beta) |
178 | 179 |
|
179 | 180 | out_grad = torch.randn_like(res_out) |
180 | 181 | ref_grad = to_reference(out_grad, True) |
@@ -303,7 +304,7 @@ def test_accuracy_outer(M, N, dtype): |
303 | 304 | ref_inp2 = to_reference(inp2, True) |
304 | 305 |
|
305 | 306 | ref_out = torch.outer(ref_inp1, ref_inp2) |
306 | | - res_out = flag_gems.outer(inp1, inp2) |
| 307 | + res_out = fused.outer(inp1, inp2) |
307 | 308 | gems_assert_close(res_out, ref_out, dtype) |
308 | 309 |
|
309 | 310 | out_grad = torch.randn_like(res_out) |
|
0 commit comments