Skip to content

Commit

Permalink
[SYCL][Joint matrix] clarify the range of the prefetch templated argu…
Browse files Browse the repository at this point in the history
…ments (#13796)

This is a clarification to match all the matrix spec that `Rows` and
`Cols` are in the range of the logical dimensions, independently from
the memory layout.
For instance, in the `ext_intel_packed` (or VNNI) layout case, prefetch
will look like:
`joint_matrix_prefetch<TK, TN>(sg, B + sg_starty / SG_SZ * TN *
vnniFactor,
N * vnniFactor, layout::ext_intel_packed,
syclex::properties{syclex::prefetch_hint_L1});
`
instead of 
`joint_matrix_prefetch<TK / vnniFactor, TN * vnniFactor>(
sg, B + sg_starty / SG_SZ * TN * vnniFactor, N * vnniFactor,
layout::ext_intel_packed,
syclex::properties{syclex::prefetch_hint_L1});
`
  • Loading branch information
dkhaldi authored May 17, 2024
1 parent b84e9e1 commit 0678c5c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ q.parallel_for(nd_range<2>(G, L), [=](nd_item<2> it) {
}
});
```
The `Rows` and `Cols` template parameters represent the logical shape
of the matrix, which is not necessarily the way the matrix is layed
out in memory. Thus, these template parameters have the same meaning
in `joint_matrix_prefetch` as they do for `joint_matrix_load`.

=== Support for Machine Learning Types
Some devices support special matrix element types that are commonly
Expand Down

0 comments on commit 0678c5c

Please sign in to comment.