Skip to content

Commit

Permalink
[SYCL][joint matrix spec] clarify coodinates of packed matrix and fix…
Browse files Browse the repository at this point in the history
… joint_matrix_copy requirements (intel#11299)
  • Loading branch information
dkhaldi authored Oct 11, 2023
1 parent 773dfc7 commit 579f1de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ joint_matrix_apply(sg, A, [=](T &val, size_t row, size_t col) {
sum_local_rows[row] += val;
});
```

In the case of `ext_intel_packed` matrix memory layout, `row` and
`col` represent the coordinates in the logical matrix before VNNI
transformation.

=== New Device Information Descriptor
Besides the query we provide in
link:sycl_ext_oneapi_matrix.asciidoc[sycl_ext_oneapi_matrix],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,18 @@ void joint_matrix_fill(Group g, joint_matrix<Group, T, Use, Rows,
namespace sycl::ext::oneapi::experimental::matrix {

template <typename Group, typename T1, typename T2, size_t Rows,
size_t Cols, use Use1, use Use2, layout Layout>
size_t Cols, use Use1, use Use2, layout Layout1, layout Layout2>
void joint_matrix_copy(Group g,
joint_matrix<Group, T1, Use1, Rows, Cols, Layout> &src,
joint_matrix<Group, T2, Use2, Rows, Cols, Layout> &dest);
joint_matrix<Group, T1, Use1, Rows, Cols, Layout1> &src,
joint_matrix<Group, T2, Use2, Rows, Cols, Layout2> &dest);

} // namespace sycl::ext::oneapi::experimental::matrix
```
This function copies `Rows x Cols` elements of type `T1` from joint
matrix `src` to `Rows x Cols` elements of type `T2` of joint matrix
`dest`. The two matrices must have the same scope, shape, and
layout. Use and type can be different so this function converts
between different `use` of matrices.
`dest`. The two matrices must have the same scope and shape. Use,
type, and layout can be different so this function converts between
different `use` of matrices.

==== Element-Wise Operations
Besides matrix multiply and add, this extension aims to make it
Expand Down

0 comments on commit 579f1de

Please sign in to comment.