-
Notifications
You must be signed in to change notification settings - Fork 787
[CUDA][Matrix][Doc] Introduced sycl_ext_oneapi_matrix_cuda extension. #6968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4b82fe7
Introduced sycl_ext_oneapi_matrix_cuda extension.
5c7510f
Updated to use unified interface.
a4c827e
commit to check table format.
c0d4c70
test table format 2
5d23f75
test table format 3
d7c2af1
test table format 4
ff12f77
test table format 5
45742d7
add CC column
190c8ca
Added table of supported matrix shapes/types.
e393207
removed typo.
9d096e7
Merge branch 'sycl' into SYCL_EXT_ONEAPI_MATRIX_CUDA
57d1387
Merge branch 'sycl' into SYCL_EXT_ONEAPI_MATRIX_CUDA
ab39f25
Updated get_wi_marray().
80a072a
Renamed extension, added back zero param constructor.
a4650dc
Removed bmad and get_wi_marray. added constraints section.
e50a2f5
Remove ref to layouts.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
95 changes: 95 additions & 0 deletions
95
...nsions/experimental/sycl_ext_oneapi_matrix/sycl_ext_oneapi_cuda_matrix.asciidoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# `sycl_ext_oneapi_matrix` extension constraints specific to the `ext_oneapi_cuda` backend. | ||
:source-highlighter: coderay | ||
:coderay-linenums-mode: table | ||
:dpcpp: pass:[DPC++] | ||
|
||
// This section needs to be after the document title. | ||
:doctype: book | ||
:toc2: | ||
:toc: left | ||
:encoding: utf-8 | ||
:lang: en | ||
|
||
:blank: pass:[ +] | ||
|
||
// Set the default source code type in this document to C++, | ||
// for syntax highlighting purposes. This is needed because | ||
// docbook uses c++ and html5 uses cpp. | ||
:language: {basebackend@docbook:c++:cpp} | ||
|
||
|
||
== Notice | ||
|
||
Copyright (c) 2022-2022 Intel Corporation. All rights reserved. | ||
|
||
NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are | ||
trademarks of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. | ||
used by permission by Khronos. | ||
|
||
This extension is written against the SYCL 2020 revision 6 specification. All | ||
references below to the "core SYCL specification" or to section numbers in the | ||
SYCL specification refer to that revision. | ||
|
||
|
||
**_NOTE:_** This document describes the current design and API for the `ext_oneapi_cuda` only features matrix | ||
extension to {dpcpp}. This is an initial experimental version to try out functionality | ||
and performance, and **future versions of this API may change in ways that are incompatible with this experimental version**. | ||
|
||
## Introduction | ||
The `ext_oneapi_cuda` backend supports `joint_matrix`, `joint_matrix_load`, `joint_matrix_store`, `joint_matrix_mad` and `joint_matrix_fill` as they are defined in the `sycl_ext_oneapi_matrix` extension. The complete set of `joint_matrix` types and shapes that are valid in the `ext_oneapi_cuda` backend are listed in this document. | ||
This extension presents any constraints that apply specifically when using the `ext_oneapi_cuda` backend, which may not apply generally to the `sycl_ext_oneapi_matrix` extension. | ||
|
||
### Valid `joint_matrix` types and shapes | ||
|
||
The complete set of matrix data types and shapes that are supported by the `ext_oneapi_cuda` backend are represented in the following table. Tm indicates the matrix element data type held by a "multiplicand" `joint_matrix`: i.e requiring `use::a` or `use::b`. Tc indicates the matrix element data type held by an "accumulator" `joint_matrix`: i.e requiring `use::accumulator`. | ||
-- | ||
[.center] | ||
|====================== | ||
|Tm (`use::a` or `use::b`) |Tc (`use::accumulator`) |M |N |K | Minimum Compute Capability | ||
.3+|half .3+|float | ||
|16 |16 |16| sm_70 | ||
|8 |32 |16| sm_70 | ||
|32 |8 |16| sm_70 | ||
.3+|half .3+|half | ||
|16 |16 |16| sm_70 | ||
|8 |32 |16| sm_70 | ||
|32 |8 |16| sm_70 | ||
.3+|int8_t .3+|int32_t | ||
|16 |16 |16| sm_72 | ||
|8 |32 |16| sm_72 | ||
|32 |8 |16| sm_72 | ||
.3+|uint8_t .3+|int32_t | ||
|16 |16 |16| sm_72 | ||
|8 |32 |16| sm_72 | ||
|32 |8 |16| sm_72 | ||
|precision::tf32 |float |16 |16 |8| sm_80 | ||
.3+|bfloat16 .3+|float | ||
|16 |16 |16 |sm_80 | ||
|8 |32 |16 |sm_80 | ||
|32 |8 |16 |sm_80 | ||
|double |double |8 |8 |4 |sm_80 | ||
|====================== | ||
-- | ||
|
||
The M, N, K triple from the above table defines the complete set of matrix shapes constructible: | ||
-- | ||
[.center] | ||
|====================== | ||
|use |NumRows | NumCols | ||
|a |M |K | ||
|b |K |N | ||
|accumulator | M| N | ||
|====================== | ||
-- | ||
|
||
### Additional contraints in the `ext_oneapi_cuda` backend | ||
|
||
IMPORTANT: The `stride` argument to `joint_matrix_load` and `joint_matrix_store` must be a multiple of 8 when `T` is `half`, and a multiple of 4 when `T` is `float`; where `T` is the type of the `joint_matrix` elements. | ||
|
||
## Revision History | ||
|
||
[frame="none",options="header"] | ||
|====================== | ||
|Rev |Date |Author |Changes | ||
|1 |2022-10-5 |Jack Kirk |Initial public working draft. | ||
|====================== |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a functional or performance requirement?
If functional, can there be a workaround to support other strides (like some sort of padding at the load level)?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is functional. The ptx builtin requires this constraint. A work-around isn't possible.