DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::ext::oneapi::experimental::matrix Namespace Reference

Namespaces

 precision
 

Classes

struct  joint_matrix
 
struct  spv_matrix_layout_traits
 
struct  spv_scope_traits< sycl::group< D > >
 
struct  spv_scope_traits< sycl::sub_group >
 
struct  tpu_params
 
struct  tpu_params< tpu::amx, void, void, void, M, N, K >
 
struct  tpu_params< tpu::dpas, void, void, void, M, N, K >
 
class  wi_data
 
class  wi_element
 
class  wi_element< sycl::ext::oneapi::experimental::bfloat16, NumRows, NumCols, Layout, Group >
 
class  wi_element< uint16_t, NumRows, NumCols, Layout, Group >
 

Enumerations

enum  matrix_layout {
  matrix_layout::row_major, matrix_layout::col_major, matrix_layout::packed_a, matrix_layout::packed_b,
  matrix_layout::row_major, matrix_layout::col_major, matrix_layout::packed_a, matrix_layout::packed_b
}
 
enum  matrix_use { matrix_use::a, matrix_use::b, matrix_use::accumulator }
 
enum  matrix_layout {
  matrix_layout::row_major, matrix_layout::col_major, matrix_layout::packed_a, matrix_layout::packed_b,
  matrix_layout::row_major, matrix_layout::col_major, matrix_layout::packed_a, matrix_layout::packed_b
}
 
enum  tpu { tpu::dpas, tpu::amx }
 
enum  matrix_type {
  matrix_type::bf8, matrix_type::bf16, matrix_type::fp16, matrix_type::fp19,
  matrix_type::fp32, matrix_type::fp64, matrix_type::sint2, matrix_type::sint4,
  matrix_type::sint8, matrix_type::sint16, matrix_type::sint32, matrix_type::sint64,
  matrix_type::uint2, matrix_type::uint4, matrix_type::uint8, matrix_type::uint16,
  matrix_type::uint32, matrix_type::uint64
}
 
enum  scope_t { scope_t::sub_group, scope_t::work_group }
 

Functions

template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout = matrix_layout::row_major, access::address_space Space>
__SYCL_ALWAYS_INLINE void joint_matrix_load (Group sg, joint_matrix< T, NumRows, NumCols, Layout, Group > &res, multi_ptr< T, Space > src, size_t stride, matrix_layout MemL)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout MatL = matrix_layout::row_major, access::address_space Space>
__SYCL_ALWAYS_INLINE void joint_matrix_store (Group sg, joint_matrix< T, NumRows, NumCols, MatL, Group > &src, multi_ptr< T, Space > res, size_t stride, matrix_layout MemL)
 
template<typename Group , typename T1 , typename T2 , typename T3 , size_t M, size_t K, size_t N, matrix_layout LayoutA, matrix_layout LayoutB, matrix_layout LayoutC>
__SYCL_ALWAYS_INLINE joint_matrix< T3, M, N, LayoutC, Group > joint_matrix_mad (Group sg, joint_matrix< T1, M, K, LayoutA, Group > &mA, joint_matrix< T2, K, N, LayoutB, Group > &mB, joint_matrix< T3, M, N, LayoutC, Group > &mC)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout, typename T2 >
__SYCL_ALWAYS_INLINE void joint_matrix_fill (Group sg, joint_matrix< T, NumRows, NumCols, Layout, Group > &res, const T2 v)
 
template<typename Group , typename S , typename T , matrix_use Use, size_t NumRows, size_t NumCols, matrix_layout Layout, access::address_space Space, std::enable_if_t< std::is_same< S, T >::value||(std::is_same< S, precision::tf32 >::value &&std::is_same< T, float >::value), bool > = true>
void joint_matrix_load (Group sg, joint_matrix< S, Use, NumRows, NumCols, Layout, Group > &res, multi_ptr< T, Space > src, size_t stride)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout, access::address_space Space>
void joint_matrix_store (Group sg, joint_matrix< T, matrix_use::accumulator, NumRows, NumCols, Layout, Group > &src, multi_ptr< T, Space > dst, size_t stride)
 
template<typename Group , typename T1 , typename T2 , std::size_t M, std::size_t K, std::size_t N, matrix_layout LayoutA, matrix_layout LayoutB, matrix_layout LayoutC>
joint_matrix< T2, matrix_use::accumulator, M, N, LayoutC, Group > joint_matrix_mad (Group sg, joint_matrix< T1, matrix_use::a, M, K, LayoutA, Group > A, joint_matrix< T1, matrix_use::b, K, N, LayoutB, Group > B, joint_matrix< T2, matrix_use::accumulator, M, N, LayoutC, Group > C)
 
float round_to_tf32 (float a)
 

Enumeration Type Documentation

◆ matrix_layout [1/2]

Enumerator
row_major 
col_major 
packed_a 
packed_b 
row_major 
col_major 
packed_a 
packed_b 

Definition at line 19 of file matrix-tensorcore.hpp.

◆ matrix_layout [2/2]

Enumerator
row_major 
col_major 
packed_a 
packed_b 
row_major 
col_major 
packed_a 
packed_b 

Definition at line 22 of file matrix-jit.hpp.

◆ matrix_type

Enumerator
bf8 
bf16 
fp16 
fp19 
fp32 
fp64 
sint2 
sint4 
sint8 
sint16 
sint32 
sint64 
uint2 
uint4 
uint8 
uint16 
uint32 
uint64 

Definition at line 35 of file static-query.hpp.

◆ matrix_use

Enumerator
accumulator 

Definition at line 17 of file matrix-tensorcore.hpp.

◆ scope_t

Enumerator
sub_group 
work_group 

Definition at line 56 of file static-query.hpp.

◆ tpu

Enumerator
dpas 
amx 

Definition at line 31 of file static-query.hpp.

Function Documentation

◆ joint_matrix_fill()

template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout, typename T2 >
__SYCL_ALWAYS_INLINE void cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_fill ( Group  sg,
joint_matrix< T, NumRows, NumCols, Layout, Group > &  res,
const T2  v 
)
inline

◆ joint_matrix_load() [1/2]

template<typename Group , typename S , typename T , matrix_use Use, size_t NumRows, size_t NumCols, matrix_layout Layout, access::address_space Space, std::enable_if_t< std::is_same< S, T >::value||(std::is_same< S, precision::tf32 >::value &&std::is_same< T, float >::value), bool > = true>
void cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_load ( Group  sg,
joint_matrix< S, Use, NumRows, NumCols, Layout, Group > &  res,
multi_ptr< T, Space >  src,
size_t  stride 
)

◆ joint_matrix_load() [2/2]

template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout = matrix_layout::row_major, access::address_space Space>
__SYCL_ALWAYS_INLINE void cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_load ( Group  sg,
joint_matrix< T, NumRows, NumCols, Layout, Group > &  res,
multi_ptr< T, Space >  src,
size_t  stride,
matrix_layout  MemL 
)
inline

◆ joint_matrix_mad() [1/2]

template<typename Group , typename T1 , typename T2 , typename T3 , size_t M, size_t K, size_t N, matrix_layout LayoutA, matrix_layout LayoutB, matrix_layout LayoutC>
__SYCL_ALWAYS_INLINE joint_matrix<T3, M, N, LayoutC, Group> cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_mad ( Group  sg,
joint_matrix< T1, M, K, LayoutA, Group > &  mA,
joint_matrix< T2, K, N, LayoutB, Group > &  mB,
joint_matrix< T3, M, N, LayoutC, Group > &  mC 
)
inline

◆ joint_matrix_mad() [2/2]

template<typename Group , typename T1 , typename T2 , std::size_t M, std::size_t K, std::size_t N, matrix_layout LayoutA, matrix_layout LayoutB, matrix_layout LayoutC>
joint_matrix<T2, matrix_use::accumulator, M, N, LayoutC, Group> cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_mad ( Group  sg,
joint_matrix< T1, matrix_use::a, M, K, LayoutA, Group >  A,
joint_matrix< T1, matrix_use::b, K, N, LayoutB, Group >  B,
joint_matrix< T2, matrix_use::accumulator, M, N, LayoutC, Group >  C 
)

◆ joint_matrix_store() [1/2]

template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout Layout, access::address_space Space>
void cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_store ( Group  sg,
joint_matrix< T, matrix_use::accumulator, NumRows, NumCols, Layout, Group > &  src,
multi_ptr< T, Space >  dst,
size_t  stride 
)

◆ joint_matrix_store() [2/2]

template<typename Group , typename T , size_t NumRows, size_t NumCols, matrix_layout MatL = matrix_layout::row_major, access::address_space Space>
__SYCL_ALWAYS_INLINE void cl::sycl::ext::oneapi::experimental::matrix::joint_matrix_store ( Group  sg,
joint_matrix< T, NumRows, NumCols, MatL, Group > &  src,
multi_ptr< T, Space >  res,
size_t  stride,
matrix_layout  MemL 
)
inline

◆ round_to_tf32()

float cl::sycl::ext::oneapi::experimental::matrix::round_to_tf32 ( float  a)

Definition at line 609 of file matrix-tensorcore.hpp.

References cl::sycl::a.