DPC++ Runtime
Runtime libraries for oneAPI DPC++
matrix-intel.hpp File Reference
#include "matrix-unified-utils.hpp"
#include "utils.hpp"
#include <CL/__spirv/spirv_types.hpp>
#include <sycl/access/access.hpp>
#include <sycl/builtins.hpp>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/detail/pi.h>
#include <sycl/exception.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp>
#include <sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp>
#include <sycl/group.hpp>
#include <sycl/multi_ptr.hpp>
#include <sycl/sub_group.hpp>
#include <cstddef>
#include <stdint.h>
#include <tuple>
#include <type_traits>
Include dependency graph for matrix-intel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::ext::oneapi::experimental::matrix::spv_matrix_layout_traits< Layout >
 
struct  sycl::_V1::ext::oneapi::experimental::matrix::spv_matrix_use_traits< Use >
 
struct  sycl::_V1::ext::oneapi::experimental::matrix::spv_scope_traits< G >
 
struct  sycl::_V1::ext::oneapi::experimental::matrix::spv_scope_traits< sycl::sub_group >
 
struct  sycl::_V1::ext::oneapi::experimental::matrix::spv_scope_traits< sycl::group< D > >
 
struct  sycl::_V1::ext::oneapi::detail::jm_type_interpretation_helper_trait< T >
 
struct  sycl::_V1::ext::oneapi::detail::jm_type_interpretation_helper_trait< sycl::ext::oneapi::experimental::matrix::precision::tf32 >
 
class  sycl::_V1::ext::oneapi::detail::wi_element< T, NumRows, NumCols, Use, Layout, Group >
 
class  sycl::_V1::ext::oneapi::detail::wi_element< sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, Layout, Group >
 
class  sycl::_V1::ext::oneapi::detail::wi_data< Group, T, Use, Rows, Cols, Layout >
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::ext
 
 sycl::_V1::ext::oneapi
 
 sycl::_V1::ext::oneapi::experimental
 
 sycl::_V1::ext::oneapi::experimental::matrix
 
 sycl::_V1::ext::oneapi::detail
 Objects of the accessor_property_list class are containers for the SYCL properties.
 
 sycl::_V1::ext::intel
 
 sycl::_V1::ext::intel::experimental
 
 sycl::_V1::ext::intel::experimental::matrix
 

Macros

#define SPV_MATRIX_LAYOUT_TRAITS(LAYOUT, SPV_LAYOUT)
 
#define SPV_MATRIX_USE_TRAITS(USE, SPV_USE)
 
#define OP(op)
 
#define OP(opassign, op)
 
#define OP(type, op)
 

Functions

template<typename Group , typename T , sycl::ext::oneapi::experimental::matrix::use Use, size_t Rows, size_t Cols, sycl::ext::oneapi::experimental::matrix::layout Layout>
decltype(auto) __SYCL_ALWAYS_INLINE sycl::_V1::ext::oneapi::detail::get_wi_data (Group sg, sycl::ext::oneapi::experimental::matrix::joint_matrix< Group, T, Use, Rows, Cols, Layout > &jm)
 
template<typename Group , typename T , typename Tp , sycl::ext::oneapi::experimental::matrix::use Use, size_t NumRows, size_t NumCols, sycl::ext::oneapi::experimental::matrix::layout Layout, access::address_space Space, access::decorated IsDecorated, std::enable_if_t< Use==sycl::ext::oneapi::experimental::matrix::use::a||Use==sycl::ext::oneapi::experimental::matrix::use::b, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store (Group, const sycl::ext::oneapi::experimental::matrix::joint_matrix< Group, Tp, Use, NumRows, NumCols, Layout > &src, multi_ptr< T, Space, IsDecorated > dst, size_t stride)
 
template<typename Group , typename T , typename Tp , sycl::ext::oneapi::experimental::matrix::use Use, size_t NumRows, size_t NumCols, sycl::ext::oneapi::experimental::matrix::layout Layout, typename PropertyListT , std::enable_if_t< Use==sycl::ext::oneapi::experimental::matrix::use::a||Use==sycl::ext::oneapi::experimental::matrix::use::b, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store (Group, const sycl::ext::oneapi::experimental::matrix::joint_matrix< Group, Tp, Use, NumRows, NumCols, Layout > &src, ext::oneapi::experimental::annotated_ptr< T, PropertyListT > dst, size_t stride)
 
template<typename Group , typename T , sycl::ext::oneapi::experimental::matrix::use Use, size_t Rows, size_t Cols, sycl::ext::oneapi::experimental::matrix::layout Layout, typename F >
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_apply (Group sg, sycl::ext::oneapi::experimental::matrix::joint_matrix< Group, T, Use, Rows, Cols, Layout > &jm, F &&lambda)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, use Use, layout Layout, typename T2 >
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_fill_checked (Group, joint_matrix< Group, T, Use, NumRows, NumCols, Layout > &Res, const T2 &Value, size_t Stride, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename S , typename T , size_t NumRows, size_t NumCols, access::address_space Space, access::decorated IsDecorated, std::enable_if_t< std::is_same< S, std::remove_const_t< T >>::value, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_load_checked (Group sg, joint_matrix< Group, S, use::accumulator, NumRows, NumCols, layout::dynamic > &Res, multi_ptr< T, Space, IsDecorated > Src, size_t Stride, layout Layout, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename S , typename T , use Use, size_t NumRows, size_t NumCols, layout Layout, access::address_space Space, access::decorated IsDecorated, std::enable_if_t< std::is_same< S, std::remove_const_t< T >>::value||(std::is_same< S, precision::tf32 >::value &&std::is_same< std::remove_const_t< T >, float >::value), bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_load_checked (Group sg, joint_matrix< Group, S, Use, NumRows, NumCols, Layout > &Res, multi_ptr< T, Space, IsDecorated > Src, size_t Stride, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, access::address_space Space, access::decorated IsDecorated>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store_checked (Group sg, joint_matrix< Group, T, use::accumulator, NumRows, NumCols, layout::dynamic > &Src, multi_ptr< T, Space, IsDecorated > Dst, size_t Stride, layout Layout, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename T , typename Tp , use Use, size_t NumRows, size_t NumCols, layout Layout, access::address_space Space, access::decorated IsDecorated, std::enable_if_t< Use==use::a||Use==use::b, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store_checked (Group sg, const joint_matrix< Group, Tp, Use, NumRows, NumCols, Layout > &Src, multi_ptr< T, Space, IsDecorated > Dst, size_t Stride, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename S , typename T , size_t NumRows, size_t NumCols, typename PropertyListT , std::enable_if_t< std::is_same< S, std::remove_const_t< T >>::value, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_load_checked (Group sg, joint_matrix< Group, S, use::accumulator, NumRows, NumCols, layout::dynamic > &Res, ext::oneapi::experimental::annotated_ptr< T, PropertyListT > Src, size_t Stride, layout Layout, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename S , typename T , use Use, size_t NumRows, size_t NumCols, layout Layout, typename PropertyListT , std::enable_if_t< std::is_same< S, std::remove_const_t< T >>::value||(std::is_same< S, precision::tf32 >::value &&std::is_same< std::remove_const_t< T >, float >::value), bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_load_checked (Group sg, joint_matrix< Group, S, Use, NumRows, NumCols, Layout > &Res, ext::oneapi::experimental::annotated_ptr< T, PropertyListT > Src, size_t Stride, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename T , size_t NumRows, size_t NumCols, typename PropertyListT >
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store_checked (Group sg, joint_matrix< Group, T, use::accumulator, NumRows, NumCols, layout::dynamic > &Src, ext::oneapi::experimental::annotated_ptr< T, PropertyListT > Dst, size_t Stride, layout Layout, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 
template<typename Group , typename T , typename Tp , use Use, size_t NumRows, size_t NumCols, layout Layout, typename PropertyListT , std::enable_if_t< Use==use::a||Use==use::b, bool > = true>
__SYCL_ALWAYS_INLINE void sycl::_V1::ext::intel::experimental::matrix::joint_matrix_store_checked (Group sg, const joint_matrix< Group, Tp, Use, NumRows, NumCols, Layout > &Src, ext::oneapi::experimental::annotated_ptr< T, PropertyListT > Dst, size_t Stride, size_t Height, size_t Width, size_t CoordX, size_t CoordY)
 

Macro Definition Documentation

◆ OP [1/3]

#define OP (   op)
Value:
template <typename T2> wi_element &operator op##=(const T2 & rhs) { \
(void)rhs; \
throw runtime_error("joint matrix is not supported on host device.", \
PI_ERROR_INVALID_DEVICE); \
}

Definition at line 396 of file matrix-intel.hpp.

◆ OP [2/3]

#define OP (   opassign,
  op 
)
Value:
wi_element &operator opassign(const sycl::ext::oneapi::bfloat16 & rhs) { \
(void)rhs; \
throw runtime_error("joint matrix is not supported on host device.", \
PI_ERROR_INVALID_DEVICE); \
}

Definition at line 396 of file matrix-intel.hpp.

◆ OP [3/3]

#define OP (   type,
  op 
)
Value:
friend type operator op( \
const wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, \
Layout, Group> &, \
throw runtime_error("joint matrix is not supported on host device.", \
PI_ERROR_INVALID_DEVICE); \
} \
friend type operator op( \
const wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, \
Layout, Group> &) { \
throw runtime_error("joint matrix is not supported on host device.", \
PI_ERROR_INVALID_DEVICE); \
}

Definition at line 396 of file matrix-intel.hpp.

◆ SPV_MATRIX_LAYOUT_TRAITS

#define SPV_MATRIX_LAYOUT_TRAITS (   LAYOUT,
  SPV_LAYOUT 
)
Value:
template <> struct spv_matrix_layout_traits<LAYOUT> { \
static constexpr __spv::MatrixLayout value = SPV_LAYOUT; \
};

Definition at line 42 of file matrix-intel.hpp.

◆ SPV_MATRIX_USE_TRAITS

#define SPV_MATRIX_USE_TRAITS (   USE,
  SPV_USE 
)
Value:
template <> struct spv_matrix_use_traits<USE> { \
static constexpr __spv::MatrixUse value = SPV_USE; \
};

Definition at line 56 of file matrix-intel.hpp.