-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add Grouped Convolution and GEMM documentation #1719
base: develop
Are you sure you want to change the base?
Conversation
@bartekxk What about using BF16, FP16 and FP32 instead of bhalf_t half_t and float ? |
* **BLayout** - B layout (RowMajor/ColumnMajor). | ||
* **CLayout** - C layout (RowMajor/ColumnMajor). | ||
* **ADataType** - A data type. | ||
* **BDataType** - B data type. | ||
* **CDataType** - C data type. |
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.
A/B/C Matrix
* **BElementwiseOperation** - fused operation on tensor B. | ||
* **CElementwiseOperation** - fused operation on tensor C. |
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.
Let's start from capital letter.
* **BElementwiseOperation** - fused operation on tensor B. |
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.
Important to note this elementwise operation is done before multiplication of those two tensors - that is on their (A/B tensor) elements.
* **AElementwiseOperation** - fused operation on tensor A. | ||
* **BElementwiseOperation** - fused operation on tensor B. | ||
* **CElementwiseOperation** - fused operation on tensor C. |
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.
Operation is done on the output (result of two matrix multiplication) matrix elements.
* **CElementwiseOperation** - fused operation on tensor C. | ||
|
||
For matrices with large K dimension `DeviceGemmSplitK` implementation is available. This implementation allows user to split K dimension between work groups. This implementation requires AtomicAdd operation on global memory (output buffer must be set to zeroes). |
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.
For matrices with large K dimension `DeviceGemmSplitK` implementation is available. This implementation allows user to split K dimension between work groups. This implementation requires AtomicAdd operation on global memory (output buffer must be set to zeroes). | |
For matrices with large K dimension `DeviceGemmSplitK` implementation is available. This implementation allows user to split K dimension between work groups. This implementation uses `AtomicAdd` operation on global memory, thus need to zero-out output buffer for correct results. |
|
||
For fused operations with additional tensor there are `DeviceGemmMultipleABD` or `DeviceGemmMultipleD` operation which require following parameters: | ||
* **DsLayout** - layouts for additional tensors for fused operations. |
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.
Please add note that all DsLayout
have to be the same as output matrix C layout.
* **DeviceGemmDl** - Device operation with DL instructions. | ||
* **DeviceGemmDpp** - Device operation with DL instructions with DPP instructions during data load. | ||
* **DeviceGemmWmma_CShuffle** - Device operation with WMMA instructions with CShuffle optimization for more optimized data store. |
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.
* **DeviceGemmWmma_CShuffle** - Device operation with WMMA instructions with CShuffle optimization for more optimized data store. | |
* **DeviceGemmWmma_CShuffle** - Device operation with WMMA instructions and CShuffle optimization for more optimized data store. |
* **DeviceGemm_Xdl_CShuffleV2** - Device operation with XDL instructions with CShuffle optimization for more optimized data store. GEMM pipeline has been optimized compared to **DeviceGemm_Xdl_CShuffle**. | ||
* **DeviceGemmXdlSkipBLds** - Device operation with XDL instructions. Load to shared memory has been skiped for B matrix. | ||
* **DeviceGemm_Xdl_WaveletModel_CShuffle** - Device operation with XDL instructions with CShuffle optimization for more optimized data store. |
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.
Please not is uses producer+consumer scheme cooperation between waves in workgroup.
* **DeviceGemmXdl** - Device operation with XDL instructions. | ||
|
||
Table of supported cases by instance factory with XDL instruction for Row/Row/Row, Row/Column/Row, Column/Row/Row or Column/Column/Row: |
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.
Are you positive that we support all those layouts for all data types?
* **BLayout** - B layout (RowMajor/ColumnMajor). | ||
* **CLayout** - C layout (RowMajor/ColumnMajor). | ||
* **ADataType** - A data type. | ||
* **BDataType** - B data type. | ||
* **CDataType** - C data type. | ||
* **AElementwiseOperation** - fused operation on tensor A. | ||
* **BElementwiseOperation** - fused operation on tensor B. | ||
* **CElementwiseOperation** - fused operation on tensor C. | ||
|
||
This implementation allows user to split K dimension between work groups. This implementation requires AtomicAdd operation on global memory (output buffer must be set to zeroes if splitK parameter is larger than one). |
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.
Like above.
No description provided.