Skip to content

Commit ef1d123

Browse files
authored
Merge branch 'phase0a-tct-token-balance' into dyn-seq-p3-aiex-to-emitc
2 parents edf0e60 + 3bcb867 commit ef1d123

48 files changed

Lines changed: 734 additions & 136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/buildAndTestRyzenAISw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
142142
ninja install
143143
# filter out slow tests (e.g. create-flows/vecmul_4x4_slow_test.mlir) due to timeout.
144-
export LIT_OPTS="-j2 -sv --timeout 600 --filter-out slow_test"
144+
export LIT_OPTS="-j1 -sv --timeout 600 --filter-out slow_test"
145145
ninja check-aie
146146
147147
popd

.pre-commit-config.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,28 +81,27 @@ repos:
8181
files: ^(python/requirements_dev\.txt|utils/mlir_(aie_)?wheels/(requirements|ci-tools)\.(in|txt))$
8282

8383
# REUSE compliance: every file must have a license/copyright notice (either
84-
# inline or declared in REUSE.toml). Scans the whole repo, so it does not
85-
# take filenames. Runs before check-copyright-format, which then validates
86-
# the notice wording.
84+
# inline or declared in REUSE.toml). Scoped to the files being pushed via
85+
# `reuse lint-file` so an unrelated dirty working tree doesn't block a push;
86+
# the authoritative whole-repo `reuse lint` still runs in CI. Runs before
87+
# check-copyright-format, which then validates the notice wording.
8788
- id: reuse-lint
8889
name: Check REUSE compliance
8990
language: python
90-
entry: reuse lint
91+
entry: reuse lint-file
9192
additional_dependencies: ['reuse[charset-normalizer]==6.2.0']
92-
pass_filenames: false
93-
always_run: true
93+
pass_filenames: true
9494
stages: [pre-push]
9595

9696
# Format gate on top of REUSE: every copyright notice must match an approved
9797
# canonical form (see utils/check_copyright_format.py). REUSE only checks that
9898
# a notice exists, not how it is written, so this catches stray commas, the
99-
# "AMD Inc." shorthand, "(c) Copyright" ordering, etc. Scans the whole repo
100-
# via `reuse lint`, so it does not take filenames.
99+
# "AMD Inc." shorthand, "(c) Copyright" ordering, etc. Scoped to the pushed
100+
# files here; the script scans the whole repo when invoked with no args (CI).
101101
- id: check-copyright-format
102102
name: Check copyright notice format
103103
language: python
104104
entry: python utils/check_copyright_format.py
105105
additional_dependencies: ['reuse[charset-normalizer]==6.2.0']
106-
pass_filenames: false
107-
always_run: true
106+
pass_filenames: true
108107
stages: [pre-push]

docs/AIEDesignPatterns.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This document is an introduction to using the AIE dialect in practice and provid
99

1010
## Using AIE Cores
1111

12-
[Core Example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/03_sync_with_locks/aie.mlir)
12+
[Core Example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/03_sync_with_locks/aie.mlir)
1313

1414
We can use the AIE Cores as below to perform some operations
1515

@@ -34,7 +34,7 @@ Perform some operations on the buffer in the core
3434
```
3535

3636
## Single-buffered Communication
37-
[Single-buffer DMA example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/05_tiledma/aie.mlir)
37+
[Single-buffer DMA example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/05_tiledma/aie.mlir)
3838

3939
Define the AIE tiles you want to communicate between. Here Tile (7,1) will be the source and (7,2) the destination.
4040

@@ -106,7 +106,7 @@ At the end, we release the lock back in state 0. This allows for the memory to r
106106

107107
## Double-buffered Communication
108108

109-
[Double-buffer DMA example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/17_shim_dma_with_core/aie.mlir)
109+
[Double-buffer DMA example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/17_shim_dma_with_core/aie.mlir)
110110

111111
This example uses the same setup as the previous. For Tile (7,2) we can define an additional lock and buffer and change the buffers to be half the size:
112112
```
@@ -158,7 +158,7 @@ We can use the core in a similar fashion, using the two locks to perform operati
158158

159159
## Controlling from the ARM Processor
160160

161-
[Controlling From ARM](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/17_shim_dma_with_core/aie.mlir)
161+
[Controlling From ARM](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/17_shim_dma_with_core/aie.mlir)
162162

163163
We can perform some operations from the ARM processor and configure the lock to start the transfer. Here is a simple example where we write to a buffer, and begin the data transfer all from the host code.
164164

@@ -220,7 +220,7 @@ XAieTile_LockRelease(&(TileInst[7][1]), 0, 1, 0); // Release lock
220220
This allows the data transfer to begin
221221

222222
## Static DDR Configuration
223-
[Static DDR](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/17_shim_dma_with_core/aie.mlir)
223+
[Static DDR](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/17_shim_dma_with_core/aie.mlir)
224224

225225
To read/write from DDR, we declare an external buffer with a location and size
226226
```
@@ -237,7 +237,7 @@ We can then use the shim_dma to read/write from that location:
237237
^bd0:
238238
AIE.use_lock(%lock70 , "Acquire", 0)
239239
AIE.dma_bd(%ext_buffer : memref<512xi32>, 0, 512)
240-
AIE.use_lock(%lolock70 k72, "Release", 1)
240+
AIE.use_lock(%lock70, "Release", 1)
241241
br ^end
242242
^end:
243243
AIE.end
@@ -348,7 +348,7 @@ XAieTile_LockRelease(&(TileInst[7][2]), 1, 0x1, 0);
348348

349349
## Using AIE ObjectFIFOs
350350

351-
[ObjectFIFO Example](https://github.com/Xilinx/mlir-aie/tree/main/test/objectFifo-stateful-transform/non_adjacency_test_1.aie.mlir)
351+
[ObjectFIFO Example](https://github.com/Xilinx/mlir-aie/tree/main/test/objectFifo-stateful-transform/base/non_adjacency_test_1.mlir)
352352

353353
An objectFIFO can be established between two or more tiles. Broadcast is possible from one producer tile to multiple consumer tiles.
354354
Unlike a typical FIFO, elements are not pushed to nor popped from the objectFIFO. Instead, a pool of memory elements is allocated to the objectFIFO by the objectFIFO lowering pass, i.e., AIEObjectFifoStatefulTransform.mlir.
@@ -491,28 +491,9 @@ module @objectFIFO {
491491
}
492492
```
493493

494-
At a higher abstraction level, a process can be registered to an objectFIFO using access patterns and work functions:
495-
```
496-
module @objectFIFO {
497-
%tile12 = AIE.tile(1, 2)
498-
%tile33 = AIE.tile(3, 3)
499-
500-
AIE.objectfifo @of1 (%tile12, {tile33}, 2 : i32) : !AIE.objectfifo<memref<16xi32>>
501-
502-
%prodAcqPattern = arith.constant dense<[1]> : tensor<1xi32>
503-
%prodRelPattern = arith.constant dense<[1]> : tensor<1xi32>
504-
%prodLength = arith.constant 12 : index
505-
func @producer_work() -> () {
506-
return
507-
}
508-
509-
AIE.objectfifo.register_process @of1 (Produce, %prodAcqPattern : tensor<1xi32>, %prodRelPattern : tensor<1xi32>, @producer_work, %prodLength)
510-
}
511-
```
512-
513494
## Using AIE broadcast_packet
514495

515-
[broadcast_packet Example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/23_broadcast_packet/aie.mlir)
496+
[broadcast_packet Example](https://github.com/Xilinx/mlir-aie/tree/main/test/unit_tests/aie/23_broadcast_packet/aie.mlir)
516497

517498
The broadcast_packet operation is a logical connection that combines broadcast and packet-switch data transferring mechanism.
518499

docs/AIEVectorization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Achieving high performance with the AIEngine architecture typically requires exe
88

99
## Affine Loops
1010

11-
A typical starting point for automatic vectorization is to consider Affine looped programs. [Example](https://github.com/Xilinx/mlir-aie/tree/main/test/aievec/pointwise_mult_f32.mlir)
11+
A typical starting point for automatic vectorization is to consider Affine looped programs.
1212
```
1313
func.func @pointwise_mult (%A: memref<2048xf32>, %B: memref<2048xf32>, %C: memref<2048xf32>) {
1414
affine.for %arg0 = 0 to 2048 {
@@ -71,7 +71,7 @@ aie-opt -affine-super-vectorize="virtual-vector-size=8 vectorize-reductions" --a
7171

7272
This code can be translated to C++ code that can be included in a Vitis design:
7373
```
74-
aie-opt -affine-super-vectorize="virtual-vector-size=8" --aie-vectorize < ../../aie/test/aievec/pointwise_mult_f32.mlir | aie-translate --aievec-to-cpp
74+
aie-opt -affine-super-vectorize="virtual-vector-size=8" --aie-vectorize < pointwise_mult_f32.mlir | aie-translate --aievec-to-cpp
7575
```
7676
```
7777
void pointwise_mult(float * restrict v1, float * restrict v2, float * restrict v3) {

docs/BuildingVersal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ When targetting the VCK5000 Versal device, you must build and install our experi
4545
4646
2. Source `utils/setup_python_packages.sh` to setup the prerequisite python
4747
packages. This script creates and installs the python packages
48-
listed in `utils/requirements.txt` and `utils/requirements_dev.txt` in
48+
listed in `python/requirements.txt` and `python/requirements_dev.txt` in
4949
a virtual python environment called 'sandbox', then it enters the sandbox:
5050
```
5151
source utils/setup_python_packages.sh

docs/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ if (DOXYGEN_FOUND)
77
set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
88
set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
99

10+
# Derive the project version from git tags (matches the wheel version) so the
11+
# doxygen PROJECT_NUMBER stays accurate without hardcoding a release number.
12+
execute_process(
13+
COMMAND ${Python3_EXECUTABLE} ${AIE_SOURCE_DIR}/utils/mlir_aie_wheels/_version_helper.py
14+
WORKING_DIRECTORY ${AIE_SOURCE_DIR}
15+
OUTPUT_VARIABLE PACKAGE_VERSION
16+
OUTPUT_STRIP_TRAILING_WHITESPACE
17+
ERROR_QUIET)
18+
if (NOT PACKAGE_VERSION)
19+
set(PACKAGE_VERSION "unknown")
20+
endif()
21+
1022
if (HAVE_DOT)
1123
set(DOT ${LLVM_PATH_DOT})
1224
endif()
@@ -22,6 +34,7 @@ if (DOXYGEN_FOUND)
2234

2335
set(abs_top_srcdir)
2436
set(abs_top_builddir)
37+
set(PACKAGE_VERSION)
2538
set(DOT)
2639
set(enable_searchengine)
2740
set(searchengine_url)

docs/Devices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@ N Columns and 6 Rows
125125

126126
-----
127127

128-
<p align="center">Copyright&copy; 2024 AMD/Xilinx</p>
128+
<p align="center">Copyright&copy; 2024-2026 Advanced Micro Devices, Inc.</p>

docs/Platform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ vck190 board + usb-c to usb cable + ethernet cable
5151
## Board setup steps
5252
After the build is complete, format an SD card (16 GB+) in fat32 format and copy the files from the linux subdirectory onto the SD card.
5353
```sh
54-
cp -r platforms/vck190_bare/petalinux/images/linux/* <SD card directory>
54+
cp -r platforms/vck190_bare_prod/petalinux/images/linux/* <SD card directory>
5555
```
5656
Put the sd card into the micro sd slot to boot up the Versal device (top of the board), connect the board usb-c connector to your host machine and turn on the board. You should run a program like TeraTerm and configure it as a serial port (115200 baud, 8b data, no parity, 1b stop, no flow control). The serial port for Versal is usually the first port but may vary in your setup.
5757

@@ -80,4 +80,4 @@ and run on the board as usual.
8080

8181
-----
8282

83-
<p align="center">Copyright&copy; 2019-2022 AMD/Xilinx</p>
83+
<p align="center">Copyright&copy; 2019-2021 Xilinx, Inc.<br>Copyright&copy; 2022-2026 Advanced Micro Devices, Inc.</p>

docs/Presentations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
</table>
4343

4444

45-
<p align="center">Copyright&copy; 2019-2022 AMD/Xilinx</p>
45+
<p align="center">Copyright&copy; 2019-2021 Xilinx, Inc.<br>Copyright&copy; 2022-2026 Advanced Micro Devices, Inc.</p>

docs/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<!-- Copyright (C) 2019-2024 Advanced Micro Devices, Inc. -->
1+
<!-- Copyright (C) 2019-2021 Xilinx, Inc. -->
2+
<!-- Copyright (C) 2022-2026 Advanced Micro Devices, Inc. -->
23
<!-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->
34
# IRON API and MLIR-based AI Engine Toolchain
45

@@ -298,4 +299,4 @@ MLIR Tutorials
298299

299300
-----
300301

301-
<p align="center">Copyright&copy; 2019-2024 Advanced Micro Devices, Inc</p>
302+
<p align="center">Copyright&copy; 2019-2021 Xilinx, Inc.<br>Copyright&copy; 2022-2026 Advanced Micro Devices, Inc.</p>

0 commit comments

Comments
 (0)