-
Notifications
You must be signed in to change notification settings - Fork 30
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
ObjectFifo Matmul + Elementwise #644
Comments
) -- In Matmul+Elemwise we get to see the intermediate L1 buffers for matmuls :- ``` alloc -> subview -> access (within amdaie.core) ``` -- We should replace the subview with a narrowed alloc itself for this case as well. -- This commit therefore addresses that as part of `--iree-amdaie-distribute-cores-and-objectfifos` pass. -- Addresses sub-action item `2` from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
For 4, see the below snippet for a sample in/output: NOTE: The circular DMA objectfifos need to be decoupled from the actual underlying memref argument, so a single circular DMA can be reused for multiple different memref arguments (see
Expected output:
|
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
@Abhishek-Varma Here is an example of input and expected output for point 4 above, showing how the C DMAs are combined with the B ones and additional read accesses are inserted to accommodate broadcasted data. Input:
Expected output:
|
-- This commit introduces a new pass `--iree-amdaie-split-buffers` to split L2 buffers for dealing with Matmul+Elementwise. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit introduces a new pass `--iree-amdaie-split-logical-objectfifos-for-connection-reuse` to split logical objectFifos for dealing with Matmul+Elementwise. -- Also contains a utility to check whether splitting can be performed. -- It addresses sub-action 2 as well from #644 Signed-off-by: Abhishek Varma <[email protected]>
-- This commit adds a new pass `--iree-amdaie-logical-objectfifos-for-connection-reuse`. -- Essentially follows the narrative after splitting of logical objectFifos and is aimed to address point 4 of #644. Signed-off-by: Abhishek Varma <[email protected]>
-- This commit adds a new pass `--iree-amdaie-logical-objectfifos-for-connection-reuse`. -- Essentially follows the narrative after splitting of logical objectFifos and is aimed to address point 4 of #644. Signed-off-by: Abhishek Varma <[email protected]>
-- This commit adds a new pass `--iree-amdaie-logical-objectfifos-for-connection-reuse`. -- Essentially follows the narrative after splitting of logical objectFifos and is aimed to address point 4 of #644. Signed-off-by: Abhishek Varma <[email protected]>
-- This commit adds a new pass `--iree-amdaie-logical-objectfifos-for-connection-reuse`. -- Essentially follows the narrative after splitting of logical objectFifos and is aimed to address point 4 of #644. Signed-off-by: Abhishek Varma <[email protected]>
The main failure in matmul + elementwise seems to be caused by too many connections being created. There are multiple ways this could be solved:
As there is no e2e support yet for the more general approaches 1 and 2, the current thought is to implement approach 3. This also still has some potential long term benefits as depending on how this is implemented and what operations are targeted, this could give very good performance as well.
For approach 3, we need following fixes and new transformations in the flow:
Fixed by :
Fixed by :
Fixed by :
The text was updated successfully, but these errors were encountered: