-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ObjFIFO Multi-Dimensional Patch (#692)
* Allow objFIFO link transforms on distribute with no bcast * Allow nd DMA for types other than i32 * Add tests * clang format * Header name fix * Remove restriction of 1xi32 for memrefs in ND DMABDs * clang format
- Loading branch information
Showing
6 changed files
with
187 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
38 changes: 38 additions & 0 deletions
38
test/objectFifo-stateful-transform/nd_dma_distribute_AIE2_bad.mlir
This file contains 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,38 @@ | ||
//===- nd_dma_distribute_AIE2_bad.mlir -------------------------*- MLIR -*-===// | ||
// | ||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
// Copyright (C) 2023, Advanced Micro Devices, Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// RUN: aie-opt --aie-objectFifo-stateful-transform --verify-diagnostics %s | ||
|
||
module @ndDMAObjFifoAIE2 { | ||
AIE.device(xcve2302) { | ||
%tile10 = AIE.tile(1, 0) | ||
%tile11 = AIE.tile(1, 1) | ||
%tile22 = AIE.tile(2, 2) | ||
%tile23 = AIE.tile(2, 3) | ||
|
||
AIE.objectFifo @of0 (%tile10, {%tile11 fromStream [<32, 16>, | ||
< 8, 1>]}, | ||
2 : i32) : !AIE.objectFifo<memref<256xi32>> | ||
|
||
AIE.objectFifo @of1 (%tile11 toStream [< 4,64>, | ||
< 2, 4>, | ||
< 8, 8>, | ||
< 4, 1>], | ||
{%tile22}, 2 : i32) : !AIE.objectFifo<memref<128xi32>> | ||
|
||
AIE.objectFifo @of2 (%tile11 toStream [< 4,64>, | ||
< 2, 4>, | ||
< 8, 8>, | ||
< 4, 1>], | ||
{%tile23}, 2 : i32) : !AIE.objectFifo<memref<128xi32>> | ||
// expected-error@+1 {{'AIE.objectFifo.link' op currently does not support objectFifos with dimensionsFromStreamPerConsumer.}} | ||
AIE.objectFifo.link [ @of0 ] -> [ @of1, @of2 ] () | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
test/objectFifo-stateful-transform/nd_dma_distribute_broadcast_AIE2_bad.mlir
This file contains 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,39 @@ | ||
//===- nd_dma_distribute_broadcast_AIE2_bad.mlir ---------------*- MLIR -*-===// | ||
// | ||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
// Copyright (C) 2023, Advanced Micro Devices, Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// RUN: aie-opt --aie-objectFifo-stateful-transform --verify-diagnostics %s | ||
|
||
module @ndDMAObjFifoAIE2 { | ||
AIE.device(xcve2302) { | ||
%tile10 = AIE.tile(1, 0) | ||
%tile11 = AIE.tile(1, 1) | ||
%tile12 = AIE.tile(1, 2) | ||
%tile22 = AIE.tile(2, 2) | ||
%tile13 = AIE.tile(1, 3) | ||
%tile23 = AIE.tile(2, 3) | ||
|
||
AIE.objectFifo @of0 (%tile10, {%tile11}, | ||
2 : i32) : !AIE.objectFifo<memref<256xi32>> | ||
|
||
AIE.objectFifo @of1 (%tile11 toStream [< 4,64>, | ||
< 2, 4>, | ||
< 8, 8>, | ||
< 4, 1>], | ||
{%tile12, %tile22}, 2 : i32) : !AIE.objectFifo<memref<128xi32>> | ||
|
||
AIE.objectFifo @of2 (%tile11 toStream [< 4,64>, | ||
< 2, 4>, | ||
< 8, 8>, | ||
< 4, 1>], | ||
{%tile13, %tile23}, 2 : i32) : !AIE.objectFifo<memref<128xi32>> | ||
// expected-error@+1 {{'AIE.objectFifo.link' op currently does not support objectFifos with dimensionsToStream and multiple consumers.}} | ||
AIE.objectFifo.link [ @of0 ] -> [ @of1, @of2 ] () | ||
} | ||
} |