diff --git a/programming_examples/basic/tiling_exploration/per_tile/README.md b/programming_examples/basic/tiling_exploration/per_tile/README.md index dcde89b48e..b7fd130f07 100644 --- a/programming_examples/basic/tiling_exploration/per_tile/README.md +++ b/programming_examples/basic/tiling_exploration/per_tile/README.md @@ -10,7 +10,7 @@ # Tiling Exploration -This IRON design flow example, called "Tiling Exploration: Per Tile", demonstrates how data may be `tiled` into smaller chunks and send/received through the `runtime_sequence`. This is a common data transformation pattern, and this example is meant to be interactive. +This IRON design flow example, called "Tiling Exploration: Per Tile", demonstrates how data may be `tiled` into smaller chunks and sent/received through the `runtime_sequence`. This is a common data transformation pattern, and this example is meant to be interactive. ## Source Files Overview diff --git a/programming_examples/basic/tiling_exploration/single_transform/README.md b/programming_examples/basic/tiling_exploration/single_transform/README.md deleted file mode 100644 index cfb0936362..0000000000 --- a/programming_examples/basic/tiling_exploration/single_transform/README.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# Tiling Exploration - -This IRON design flow example, called "Tiling Exploration", demonstrates how data may be `tiled` on input/output. This is a common data transformation pattern, and this example is meant to be interactive. - -## Source Files Overview - -TODO - -## Design Overview - -TODO - -## Design Component Details - -### AIE Array Structural Design - -TODO - -## Usage - -TODO diff --git a/programming_examples/basic/tiling_exploration/single_transform/Makefile b/programming_examples/basic/tiling_exploration/tile_group/Makefile similarity index 83% rename from programming_examples/basic/tiling_exploration/single_transform/Makefile rename to programming_examples/basic/tiling_exploration/tile_group/Makefile index ccec0077b0..227c66bdfa 100644 --- a/programming_examples/basic/tiling_exploration/single_transform/Makefile +++ b/programming_examples/basic/tiling_exploration/tile_group/Makefile @@ -12,10 +12,10 @@ srcdir := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) include ${srcdir}/../../../makefile-common -tensor_height = 32 -tensor_width = 32 -tile_height = 4 -tile_width = 4 +tensor_height = 8 +tensor_width = 8 +tile_height = 2 +tile_width = 2 data_str=${tensor_height}_${tensor_width}_${tile_height}_${tile_width} .PHONY: all template clean @@ -35,5 +35,9 @@ build/final_${data_str}.xclbin: build/aie_${data_str}.mlir run: build/final_${data_str}.xclbin build/insts_${data_str}.txt ${powershell} python3 ${srcdir}/test.py -x build/final_${data_str}.xclbin -i build/insts_${data_str}.txt -k MLIR_AIE --tensor-height ${tensor_height} --tensor-width ${tensor_width} --tile-height ${tile_height} --tile-width ${tile_width} +generate_access_map: ${srcdir}/aie2.py + mkdir -p ${@D} + python3 $< --tensor-height ${tensor_height} --tensor-width ${tensor_width} --tile-height ${tile_height} --tile-width ${tile_width} --generate-access-map ${M} ${K} + clean: rm -rf build diff --git a/programming_examples/basic/tiling_exploration/tile_group/README.md b/programming_examples/basic/tiling_exploration/tile_group/README.md new file mode 100644 index 0000000000..1479e1c221 --- /dev/null +++ b/programming_examples/basic/tiling_exploration/tile_group/README.md @@ -0,0 +1,45 @@ + + +# Tiling Exploration + +This IRON design flow example, called "Tiling Exploration: Single Transform", demonstrates how data may be `tiled` into smaller chunks and grouped into collections of tiles and sent/received through the `runtime_sequence`. This is a common data transformation pattern, and this example is meant to be interactive. + +## Source Files Overview + +1. `aie2.py`: A Python script that defines the AIE array structural design using MLIR-AIE operations and the `TensorTiler` to specify 'tiles' of data to be transferred out of the design. The file generates MLIR that is then compiled using `aiecc.py` to produce design binaries (ie. XCLBIN and inst.txt for the NPU in Ryzen™ AI). + +1. `test.py`: This Python code is responsible for loading the compiled XCLBIN file, configuring the AIE module, providing input data, and executing the AIE design on the NPU. After executing, the script verifies the results against expected output. + +## Design Overview + +This design has no inputs; it produces a single output tensor. The single core used in this design touches each element in the output tensor seemingly sequentially. However, due to the data transformation (via `TensorTile`s) in the `runtime_sequence`, the output data is in 'tiled' order, as seen in the picture below. + +
+ +