Skip to content

Commit d81d8de

Browse files
authored
[SYCL][Joint Matrix] Tests query for default subgroup size (#13798)
Changes: * Main folder now does not specify the subgroup (SG) size , it queries it * SG32 folder overrides the default SG size, through a `#define` * XMX8 folder does not specify the SG size, it queries it * minor cleanups * `joint_matrix_opt_kernel_feature_impl.hpp` - issues a different error code than before. I believe now that it is a named kernel it might be taking a different code path through the runtime. Was `errc::kernel_not_supported` now `errc::invalid`. I checked and if i modify the tile size of `N` to be reasonable the test passes as expected.
1 parent ba8e786 commit d81d8de

File tree

123 files changed

+488
-538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+488
-538
lines changed

sycl/test-e2e/Matrix/SG32/element_wise_abc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717
constexpr size_t TN = 16;
1818

1919
#include "../element_wise_abc_impl.hpp"

sycl/test-e2e/Matrix/SG32/element_wise_all_ops_half.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "../common.hpp"
1717

18-
constexpr size_t SG_SZ = 32;
18+
#define SG_SZ 32
1919
constexpr size_t TN = 16;
2020

2121
#include "../element_wise_all_ops_half_impl.hpp"

sycl/test-e2e/Matrix/SG32/element_wise_all_ops_int8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717
constexpr size_t TN = 16;
1818

1919
#include "../element_wise_all_ops_int8_impl.hpp"

sycl/test-e2e/Matrix/SG32/element_wise_all_ops_int8_packed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "../common.hpp"
1717

18-
constexpr size_t SG_SZ = 32;
18+
#define SG_SZ 32
1919
constexpr size_t TN = 16;
2020

2121
#include "../element_wise_all_ops_int8_packed_impl.hpp"

sycl/test-e2e/Matrix/SG32/element_wise_all_ops_tf32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717
constexpr size_t TN = 16;
1818

1919
#include "../element_wise_all_ops_tf32_impl.hpp"

sycl/test-e2e/Matrix/SG32/element_wise_all_sizes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717

1818
#include "../element_wise_all_sizes_impl.hpp"

sycl/test-e2e/Matrix/SG32/get_coord_float_matC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using namespace sycl;
1818
using namespace sycl::ext::oneapi::experimental::matrix;
1919

20-
constexpr size_t SG_SZ = 32;
20+
#define SG_SZ 32
2121
constexpr size_t TN = 16;
2222

2323
#include "../get_coord_float_matC_impl.hpp"

sycl/test-e2e/Matrix/SG32/get_coord_int8_matA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using namespace sycl;
1818
using namespace sycl::ext::oneapi::experimental::matrix;
1919

20-
constexpr size_t SG_SZ = 32;
20+
#define SG_SZ 32
2121
constexpr size_t TN = 16;
2222

2323
#include "../get_coord_int8_matA_impl.hpp"

sycl/test-e2e/Matrix/SG32/get_coord_int8_matB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using namespace sycl;
1919
using namespace sycl::ext::oneapi::experimental::matrix;
2020

21-
constexpr size_t SG_SZ = 32;
21+
#define SG_SZ 32
2222
constexpr size_t TN = 16;
2323

2424
#include "../get_coord_int8_matB_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_all_sizes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using namespace sycl;
1818
using namespace sycl::ext::oneapi::experimental::matrix;
1919

20-
constexpr size_t SG_SZ = 32;
20+
#define SG_SZ 32
2121
// Sub-matrix N dimension
2222
static constexpr size_t SN = 16;
2323

sycl/test-e2e/Matrix/SG32/joint_matrix_apply_bf16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717
constexpr size_t TN = 16;
1818

1919
#include "../joint_matrix_apply_bf16_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../common.hpp"
2020
#include <cstddef>
2121

22-
constexpr size_t SG_SZ = 32;
22+
#define SG_SZ 32
2323
constexpr size_t TN = 16;
2424

2525
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../common.hpp"
1717
#include <cstddef>
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_unroll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "../common.hpp"
2222
#include <cstddef>
2323

24-
constexpr size_t SG_SZ = 32;
24+
#define SG_SZ 32
2525
constexpr size_t TN = 16;
2626

2727
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_unroll_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "../common.hpp"
1919
#include <cstddef>
2020

21-
constexpr size_t SG_SZ = 32;
21+
#define SG_SZ 32
2222
constexpr size_t TN = 16;
2323

2424
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bfloat16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using namespace sycl;
2020
using namespace sycl::ext::oneapi::experimental::matrix;
2121
using bfloat16 = sycl::ext::oneapi::bfloat16;
2222

23-
constexpr size_t SG_SZ = 32;
23+
#define SG_SZ 32
2424
constexpr size_t TN = 16;
2525

2626
#include "../joint_matrix_bfloat16_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_bfloat16_colmajorA_colmajorB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace sycl;
2525
using namespace sycl::ext::oneapi::experimental::matrix;
2626
using bfloat16 = sycl::ext::oneapi::bfloat16;
2727

28-
constexpr size_t SG_SZ = 32;
28+
#define SG_SZ 32
2929
constexpr size_t TN = 16;
3030

3131
#include "../joint_matrix_bfloat16_colmajorA_colmajorB_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_colA_rowB_colC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "../common.hpp"
1717

18-
constexpr size_t SG_SZ = 32;
18+
#define SG_SZ 32
1919
constexpr size_t TN = 16;
2020

2121
#include "../joint_matrix_colA_rowB_colC_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_down_convert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717

1818
#include "../joint_matrix_down_convert_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_half.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using namespace sycl;
1919
using namespace sycl::ext::oneapi::experimental::matrix;
2020

21-
constexpr size_t SG_SZ = 32;
21+
#define SG_SZ 32
2222
constexpr size_t TN = 16;
2323

2424
#include "../joint_matrix_half_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_int8_colmajorA_colmajorB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
using namespace sycl;
2222
using namespace sycl::ext::oneapi::experimental::matrix;
2323

24-
constexpr size_t SG_SZ = 32;
24+
#define SG_SZ 32
2525
constexpr size_t TN = 16;
2626

2727
#include "../joint_matrix_int8_colmajorA_colmajorB_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_int8_vnni.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using namespace sycl;
1919
using namespace sycl::ext::oneapi::experimental::matrix;
2020

21-
constexpr size_t SG_SZ = 32;
21+
#define SG_SZ 32
2222
constexpr size_t TN = 16;
2323

2424
#include "../joint_matrix_int8_vnni_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_out_bounds.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "../common.hpp"
1717

18-
constexpr size_t SG_SZ = 32;
18+
#define SG_SZ 32
1919
constexpr size_t TN = 16;
2020
constexpr size_t MATRIX_K = 1024 + 24;
2121

sycl/test-e2e/Matrix/SG32/joint_matrix_ss_int8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using namespace sycl;
1717
using namespace sycl::ext::oneapi::experimental::matrix;
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_ss_int8_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_su_int8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using namespace sycl;
1717
using namespace sycl::ext::oneapi::experimental::matrix;
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_su_int8_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_tf32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using namespace sycl;
1717
using namespace sycl::ext::oneapi::experimental::matrix;
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_tf32_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_transposeC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "../common.hpp"
1515

16-
constexpr size_t SG_SZ = 32;
16+
#define SG_SZ 32
1717
constexpr size_t TN = 16;
1818

1919
#include "../joint_matrix_transposeC_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_unaligned_k.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "../common.hpp"
1717

18-
constexpr size_t SG_SZ = 32;
18+
#define SG_SZ 32
1919
constexpr size_t TN = 16;
2020
static constexpr size_t MATRIX_K = 1024 + 14;
2121

sycl/test-e2e/Matrix/SG32/joint_matrix_us_int8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using namespace sycl;
1717
using namespace sycl::ext::oneapi::experimental::matrix;
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_us_int8_impl.hpp"

sycl/test-e2e/Matrix/SG32/joint_matrix_uu_int8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using namespace sycl;
1717
using namespace sycl::ext::oneapi::experimental::matrix;
1818

19-
constexpr size_t SG_SZ = 32;
19+
#define SG_SZ 32
2020
constexpr size_t TN = 16;
2121

2222
#include "../joint_matrix_uu_int8_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_abc.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "../common.hpp"
1414

15-
#define SG_SZ 8
1615
constexpr size_t TN = 8;
1716

1817
#include "../element_wise_abc_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_all_ops_half.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "../common.hpp"
1616

17-
#define SG_SZ 8
1817
constexpr size_t TN = 8;
1918

2019
#include "../element_wise_all_ops_half_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_all_ops_int8.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "../common.hpp"
1414

15-
#define SG_SZ 8
1615
constexpr size_t TN = 8;
1716

1817
#include "../element_wise_all_ops_int8_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_all_ops_int8_packed.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "../common.hpp"
1616

17-
#define SG_SZ 8
1817
constexpr size_t TN = 8;
1918

2019
#include "../element_wise_all_ops_int8_packed_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_all_sizes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "../common.hpp"
1515

16-
#define SG_SZ 8
1716
constexpr size_t TN = 8;
1817

1918
#include "../element_wise_all_sizes_impl.hpp"

sycl/test-e2e/Matrix/XMX8/element_wise_all_sizes_no_split.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "../common.hpp"
1818

19-
#define SG_SZ 8
2019
constexpr size_t TN = 8;
2120

2221
#include "../element_wise_all_sizes_impl.hpp"

sycl/test-e2e/Matrix/XMX8/get_coord_float_matC.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using namespace sycl;
1919
using namespace sycl::ext::oneapi::experimental::matrix;
2020

21-
constexpr size_t SG_SZ = 8;
2221
constexpr size_t TN = 8;
2322

2423
#include "../get_coord_float_matC_impl.hpp"

sycl/test-e2e/Matrix/XMX8/get_coord_int8_matA.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using namespace sycl;
1919
using namespace sycl::ext::oneapi::experimental::matrix;
2020

21-
constexpr size_t SG_SZ = 8;
2221
constexpr size_t TN = 8;
2322

2423
#include "../get_coord_int8_matA_impl.hpp"

sycl/test-e2e/Matrix/XMX8/get_coord_int8_matB.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
using namespace sycl;
1818
using namespace sycl::ext::oneapi::experimental::matrix;
1919

20-
constexpr size_t SG_SZ = 8;
2120
constexpr size_t TN = 8;
2221

2322
#include "../get_coord_int8_matB_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_all_sizes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using namespace sycl;
1616
using namespace sycl::ext::oneapi::experimental::matrix;
1717

18-
#define SG_SZ 8
1918
constexpr size_t SN = 8;
2019

2120
#include "../joint_matrix_all_sizes_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_apply_bf16.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "../common.hpp"
1414

15-
#define SG_SZ 8
1615
constexpr size_t TN = 8;
1716

1817
#include "../joint_matrix_apply_bf16_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "../common.hpp"
1616
#include <cstddef>
1717

18-
#define SG_SZ 8
1918
constexpr size_t TN = 8;
2019

2120
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "../common.hpp"
1616
#include <cstddef>
1717

18-
#define SG_SZ 8
1918
constexpr size_t TN = 8;
2019

2120
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_unroll.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "../common.hpp"
1818
#include <cstddef>
1919

20-
#define SG_SZ 8
2120
constexpr size_t TN = 8;
2221

2322
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_unroll_init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "../common.hpp"
1818
#include <cstddef>
1919

20-
#define SG_SZ 8
2120
constexpr size_t TN = 8;
2221

2322
#include "../joint_matrix_bf16_fill_k_cache_impl.hpp"

sycl/test-e2e/Matrix/XMX8/joint_matrix_bfloat16.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using namespace sycl;
1616
using namespace sycl::ext::oneapi::experimental::matrix;
1717

18-
#define SG_SZ 8
1918
constexpr size_t TN = 8;
2019

2120
#include "../joint_matrix_bfloat16_impl.hpp"

0 commit comments

Comments
 (0)