Skip to content

Commit 35db973

Browse files
[SYCL] [MATRIX] Enable joint_matrix_load, joint_matrix_store, and joint_matrix_mad for AMX (#3503)
We provide new interfaces for matrix muliply in this patch: 1. A new class called joint_matrix is introduced, and the user needs to specify the type of the elements, sizes, and the memory layout. 2. joint_matrix_load is used for loading data from main memory to tiles of AMX or kernel's local memory. 3. joint_matrix_store is used for storing data tiles of AMX or kernel's local memory to main memory. 4. joint_matrix_mad is used for the matrix multiply and add function. It performs the multiply operation on the matrices A and B, accumulates the result with C and returns the result. With this patch, the following operation can be realized: C = A*B+C 1. All cases where A(int8, any-size, row_major), B(int8, any-size, packed_b), C(int32, any-size, row_major) 2. All cases where A(bf16, any-size, row_major), B(bf16, any-size, packed_b), C(float, any-size, row_major)
1 parent d163d2c commit 35db973

File tree

5 files changed

+819
-0
lines changed

5 files changed

+819
-0
lines changed

sycl/include/CL/sycl.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <CL/sycl/ONEAPI/filter_selector.hpp>
1414
#include <CL/sycl/ONEAPI/function_pointer.hpp>
1515
#include <CL/sycl/ONEAPI/group_algorithm.hpp>
16+
#include <CL/sycl/ONEAPI/intel_matrix/matrix.hpp>
1617
#include <CL/sycl/ONEAPI/reduction.hpp>
1718
#include <CL/sycl/ONEAPI/sub_group.hpp>
1819
#include <CL/sycl/accessor.hpp>

0 commit comments

Comments
 (0)