You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add changing the default sizes in the query to M, N, K to the todo list
- Add missing layout to the alias matrices in query
- Add comment about the combinations array in the size-only query case
- Add the combinations array to the validation case as well, for consistency
- Add a table that explains each of the query class members and type aliases
- Adjust the order of types and sizes in the combination type
Copy file name to clipboardExpand all lines: sycl/doc/extensions/Matrix/dpcpp-joint-matrix.asciidoc
+76-25Lines changed: 76 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -246,7 +246,37 @@ The query interface proposed here consists of three functionalities:
246
246
247
247
- Construct the matrices using a default shape if user does not provide a combination. This corresponds to the case where the user provides the sizes of large `tile` matrices but does not specify the sizes of the corresponding submatrices of the `tiles`. In this case, the query will construct these submatrices of the matrices whose size the user provided.
248
248
249
-
- General query interface for sizes, types, static/dynamic, scope. This is needed to avoid padding by the user, for tuning, and efficient code generation if used by a library. The general query return an array of `combinations` of `combination` type. Each combination includes the sizes and the types for the matrices A, B, and C. Note that for each TPU, the query returns `max_msize, max_nsize, max_ksize` or `msize, nsize, ksize` exclusively depending whether the implementation supports a continuous or discrete number of sizes. For example, Intel AMX implementation supports a continuous number of sizes so the `max_*` variant is applied and only the maximum number is returned. DPAS implementation, on the other hand, supports a discrete list of numbers so the `msize, nsize, ksize` variant is applied.
249
+
- General query interface for sizes, types, static/dynamic, scope. This is needed to avoid padding by the user, for tuning, and efficient code generation if used by a library. The general query return an array of `combinations` of `combination` type. Each combination includes the sizes and the types for the matrices A, B, and C. Note that for each TPU, the query returns `max_msize, max_nsize, max_ksize` or `msize, nsize, ksize` exclusively depending whether the implementation supports a continuous or discrete number of sizes. For example, Intel AMX implementation supports a continuous number of sizes so the `max_*` variant is applied and only the maximum number is returned. DPAS implementation, on the other hand, supports a discrete list of numbers so the `msize, nsize, ksize` variant is applied.
250
+
251
+
The table below provides a desciption for each of the member variables and type aliases in `tpu_params` class.
252
+
253
+
[frame="none",options="header"]
254
+
|======================
255
+
| Member/type alias in `tpu_params` |Description
256
+
|`type_a`| type alias for the type of matrix A
257
+
|`type_b`| type alias for the type of matrix B
258
+
|`type_c`| type alias for the type of matrix C
259
+
|`defaultM`| when no sizes are provided by the user, indicates the suggested default size for M; usually this corresponds to the maximum size the implementation supports
260
+
|`defaultN`| when no sizes are provided by the user, indicates the suggested default size for N; usually this corresponds to the maximum size the implementation supports
261
+
|`defaultK`| when no sizes are provided by the user, indicates the suggested default size for K; usually this corresponds to the maximum size the implementation supports
262
+
|`joint_matrix_a`| type alias for `joint_matrix` for matrix A
263
+
|`joint_matrix_b`| type alias for `joint_matrix` for matrix B
264
+
|`joint_matrix_c`| type alias for `joint_matrix` for matrix C
265
+
|`dynamic_p`| a boolean that indicates whether the implementation supports dynamic sizes (true) or not (false)
266
+
|numtiles| indicates number of tiles in Intel AMX (does not apply to DPAS)
267
+
|scope| indicates the memory and execution scope supported by the TPU implementation
268
+
|`combination` | composes the types and sizes of A, B, C matrices allowed in one combination
269
+
|`max_msize`, `max_nsize`, `max_ksize`|When one of these members is non-zero, it indicates that the TPU supports all element sizes in the range from 1 up to the given value. By contrast, a zero value indicates that the TPU implementation supports only a discrete set of element sizes, which are given by the corresponding msize, nsize, or ksize members
270
+
|`msize`, `nsize`, `ksize`| presents one of the sizes that the TPU implementation supports
271
+
|`atype`, `btype`, `ctype`| indicates the types supported in the combination
272
+
|`combinations` |Tells the set of supported matrix sizes and types according to the template parameters that are provided. In the "general query" form, the user provides only the TPU type, so the combinations array contains all supported tile sizes and element types for that TPU. In the "default values" form, the user provides the TPU type and element types, so the combinations array contains only those supported matrix sizes and element types that match those element types on that TPU. In the "validation" form, the user provides the TPU type, element types, and element sizes.
273
+
|`num_combinations`| indicates number of combinations supported by the TPU implementation which corresponds to the size of the `combinations` array
@@ -541,6 +589,9 @@ We did not utilize this extension for this matrix API version because sub-group
541
589
## TODO List
542
590
- Add support for fill matrix and element-wise operations features
543
591
- Add 'matrix_use' parameter to the matrix to distinguish between matrix A, B, and matrix accumulator. This is necessary for supporting VNNI and transpose transform
592
+
- Change the names default sizes in the query from defaultM, defaultN, defaultK to M,N,K
593
+
- Change the type of `scope` in the query interface to be able to return more than one value. This will be useful in the event we support other scopes like workgroup besides subgroups
0 commit comments