Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
denolf committed Apr 15, 2024
1 parent d9a5413 commit 711f2ea
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions programming_examples/basic/vector_max_reduce/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import sys


def my_max_reduce():
N = 1024

Expand All @@ -38,16 +39,22 @@ def device_body():
memRef_O_ty = T.memref(1, T.i32())

# AIE Core Function declarations
max_reduce_vector = external_func("vector_max", inputs=[memRef_I_ty, memRef_O_ty, T.i32()])
max_reduce_scalar = external_func("scalar_max", inputs=[memRef_I_ty, memRef_O_ty, T.i32()])
max_reduce_vector = external_func(
"vector_max", inputs=[memRef_I_ty, memRef_O_ty, T.i32()]
)
max_reduce_scalar = external_func(
"scalar_max", inputs=[memRef_I_ty, memRef_O_ty, T.i32()]
)

# Tile declarations
ShimTile = tile(int(sys.argv[2]), 0)
ComputeTile2 = tile(int(sys.argv[2]), 2)

# AIE-array data movement with object fifos
of_in = object_fifo("in", ShimTile, ComputeTile2, buffer_depth, memRef_I_ty)
of_out = object_fifo("out", ComputeTile2, ShimTile, buffer_depth, memRef_O_ty)
of_out = object_fifo(
"out", ComputeTile2, ShimTile, buffer_depth, memRef_O_ty
)

# Set up compute tiles

Expand Down

0 comments on commit 711f2ea

Please sign in to comment.