|
10 | 10 | assert_raises, suppress_warnings, assert_raises_regex, assert_allclose
|
11 | 11 | )
|
12 | 12 |
|
| 13 | +try: |
| 14 | + COMPILERS = np.show_config(mode="dicts")["Compilers"] |
| 15 | + USING_CLANG_CL = COMPILERS["c"]["name"] == "clang-cl" |
| 16 | +except TypeError: |
| 17 | + USING_CLANG_CL = False |
| 18 | + |
13 | 19 | # Setup for optimize einsum
|
14 | 20 | chars = 'abcdefghij'
|
15 | 21 | sizes = np.array([2, 3, 4, 5, 4, 3, 2, 6, 5, 4, 3])
|
@@ -611,13 +617,23 @@ def check_einsum_sums(self, dtype, do_opt=False):
|
611 | 617 | [2.]) # contig_stride0_outstride0_two
|
612 | 618 |
|
613 | 619 | def test_einsum_sums_int8(self):
|
614 |
| - if sys.platform == 'darwin' and platform.machine() == 'x86_64': |
615 |
| - pytest.xfail('Fails on macOS x86-64 with Meson, see gh-23838') |
| 620 | + if ( |
| 621 | + (sys.platform == 'darwin' and platform.machine() == 'x86_64') |
| 622 | + or |
| 623 | + USING_CLANG_CL |
| 624 | + ): |
| 625 | + pytest.xfail('Fails on macOS x86-64 and when using clang-cl ' |
| 626 | + 'with Meson, see gh-23838') |
616 | 627 | self.check_einsum_sums('i1')
|
617 | 628 |
|
618 | 629 | def test_einsum_sums_uint8(self):
|
619 |
| - if sys.platform == 'darwin' and platform.machine() == 'x86_64': |
620 |
| - pytest.xfail('Fails on macOS x86-64 with Meson, see gh-23838') |
| 630 | + if ( |
| 631 | + (sys.platform == 'darwin' and platform.machine() == 'x86_64') |
| 632 | + or |
| 633 | + USING_CLANG_CL |
| 634 | + ): |
| 635 | + pytest.xfail('Fails on macOS x86-64 and when using clang-cl ' |
| 636 | + 'with Meson, see gh-23838') |
621 | 637 | self.check_einsum_sums('u1')
|
622 | 638 |
|
623 | 639 | def test_einsum_sums_int16(self):
|
|
0 commit comments