Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
  • Loading branch information
MrSidims committed Apr 22, 2024
1 parent 274d002 commit 90beee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
1 change: 1 addition & 0 deletions sycl/include/CL/__spirv/spirv_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// Convergent attribute
#ifdef __SYCL_DEVICE_ONLY__
#define __SYCL_CONVERGENT__ __attribute__((convergent))
//#define USE_COOP_MATRIX
#else
#define __SYCL_CONVERGENT__
#endif
Expand Down
14 changes: 1 addition & 13 deletions sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class wi_element {
spv_matrix_use_traits<Use>::value,
spv_scope_traits<Group>::value>(&M.spvm, idx);
storage_element_type elem = *ExtractP;
// storage_element_type elem = __spirv_Load<T>(ExtractP);
#endif // USE_COOP_MATRIX
return elem;
#else
Expand All @@ -171,7 +170,6 @@ class wi_element {
spv_matrix_use_traits<Use>::value,
spv_scope_traits<Group>::value>(&M.spvm, idx);
return *ExtractP != static_cast<storage_element_type>(0);
// return __spirv_Load<T>(ExtractP) != static_cast<storage_element_type>(0);
#endif // USE_COOP_MATRIX
#else
throw runtime_error("joint matrix is not supported on host device.",
Expand All @@ -187,7 +185,6 @@ class wi_element {
#else
T2 *InsertP = __spirv_AccessChain(&M.spvm, idx);
*InsertP = static_cast<storage_element_type>(rhs);
// __spirv_Store(InsertP, static_cast<storage_element_type>(rhs));
#endif // USE_COOP_MATRIX
return *this;
#else
Expand Down Expand Up @@ -215,11 +212,6 @@ class wi_element {
&rhs.M.spvm, rhs.idx);
T *InsertP = __spirv_AccessChain(&M.spvm, idx);
*InsertP = *ExtractP;
/*
T RhsVal = __spirv_Load(ExtractP);
T *InsertP = __spirv_AccessChain(&M.spvm, idx);
__spirv_Store(InsertP, RhsVal);
*/
#endif // USE_COOP_MATRIX
return *this;
#else
Expand Down Expand Up @@ -344,7 +336,6 @@ class wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, Layout,
spv_matrix_use_traits<Use>::value,
spv_scope_traits<Group>::value>(&M.spvm, idx);
sycl::ext::oneapi::bfloat16 Elem = *ExtractP;
// __spirv_Load<sycl::ext::oneapi::bfloat16>(ExtractP);
return sycl::fabs(static_cast<float>(Elem)) >=
std::numeric_limits<float>::epsilon();
#endif // USE_COOP_MATRIX
Expand All @@ -360,7 +351,7 @@ class wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, Layout,
M.spvm = __spirv_VectorInsertDynamic(M.spvm, rhs, idx);
#else
sycl::ext::oneapi::bfloat16 *InsertP = __spirv_AccessChain(&M.spvm, idx);
__spirv_Store<sycl::ext::oneapi::bfloat16>(InsertP, rhs);
*InsertP = rhs;
#endif // USE_COOP_MATRIX
return *this;
#else
Expand Down Expand Up @@ -391,9 +382,6 @@ class wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, Layout,
rhs.idx);
sycl::ext::oneapi::bfloat16 *InsertP = __spirv_AccessChain(&M.spvm, idx);
*InsertP = *ExtractP;
/* sycl::ext::oneapi::bfloat16 RhsVal = __spirv_Load(ExtractP);
sycl::ext::oneapi::bfloat16 *InsertP = __spirv_AccessChain(&M.spvm, idx);
__spirv_Store(InsertP, RhsVal);*/
#endif // USE_COOP_MATRIX
return *this;
#else
Expand Down

0 comments on commit 90beee1

Please sign in to comment.