Skip to content

Commit

Permalink
Remove lingering npu_dma_memcpy_nd from alt examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hunhoffe committed Nov 14, 2024
1 parent efbff0e commit ee0fa1a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,19 +385,6 @@ def sequence(A, B, C):
dma_start_task(a_task)
in_tasks.append(a_task)

npu_dma_memcpy_nd(
metadata=B_l3l2_fifos[col],
bd_id=2 * tile_row + 2,
mem=B,
offsets=[0, 0, 0, B_col_offset],
sizes=[
N // n // n_aie_cols,
K // k // n_aie_rows,
k * n_aie_rows,
n,
],
strides=[n * n_aie_cols, k * n_aie_rows * N, N, 1],
)
b_task = dma_configure_task_for(B_l3l2_fifos[col])
with bds(b_task) as bd:
with bd[0]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@ def sequence(A, B, C):
dma_start_task(a_task)
a_tasks.append(a_task)

npu_dma_memcpy_nd(
metadata=outC_fifos[i],
bd_id=0,
mem=C,
offsets=[0, 0, 0, C_offset],
sizes=[1, 1, 1, C_sz_div_n_cores],
strides=[0, 0, 0, 1],
)

c_task = dma_configure_task_for(outC_fifos[i], issue_token=True)
with bds(c_task) as bd:
with bd[0]:
Expand Down
5 changes: 0 additions & 5 deletions programming_examples/ml/eltwise_mul/aie2_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ def sequence(A, B, C):
size=trace_size,
offset=N_in_bytes,
)
npu_dma_memcpy_nd(metadata=inA, bd_id=1, mem=A, sizes=[1, 1, 1, N])
npu_dma_memcpy_nd(metadata=inB, bd_id=2, mem=B, sizes=[1, 1, 1, N])
npu_dma_memcpy_nd(metadata=outC, bd_id=0, mem=C, sizes=[1, 1, 1, N])
# outC will only complete after inA and inB complete, so we just wait on outC instead of all
dma_wait(outC)

in_a_task = dma_configure_task_for(inA)
with bds(in_a_task) as bd:
Expand Down

0 comments on commit ee0fa1a

Please sign in to comment.