Skip to content

Commit

Permalink
Cascade matrix multiplication test with Peano (#1856)
Browse files Browse the repository at this point in the history
Co-authored-by: Javier Setoain <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 19, 2024
1 parent acccf76 commit f4b52e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions aie_kernels/aie2/cascade_mm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void matmul_scalar_cascade_put_only(T_in *a, T_in *b, T_out *c) {
running_sum += a[row * colA + i] * b[i * colB + col];
}
v16int32 v16 = undef_v16int32();
v16 = upd_elem(v16, 0, running_sum);
v16 = upd_elem(v16, 0, (int)running_sum);
put_mcd(v16);
}
}
Expand All @@ -51,7 +51,7 @@ void matmul_scalar_cascade_get_only(T_in *a, T_in *b, T_out *c) {
running_sum += a[row * colA + i] * b[i * colB + col];
}
v16int32 v16 = get_scd_v16int32();
running_sum += ext_elem(v16, 0);
running_sum += ext_elem(v16, 0U);
c[row * colB + col] += running_sum;
}
}
Expand All @@ -68,8 +68,8 @@ void matmul_scalar_cascade_put_get(T_in *a, T_in *b, T_out *c) {
running_sum += a[row * colA + i] * b[i * colB + col];
}
v16int32 v16 = get_scd_v16int32();
running_sum += ext_elem(v16, 0);
v16 = upd_elem(v16, 0, running_sum);
running_sum += ext_elem(v16, 0U);
v16 = upd_elem(v16, 0, (int)running_sum);
put_mcd(v16);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ target_suffix=${M}x${K}x${N}_${m}x${k}x${n}_${n_aie_cols}c

include ${srcdir}/../makefile-common

CHESS=true

build/mm_${m}x${k}x${n}.o: ${kernels_dir}/cascade_mm.cc
mkdir -p ${@D}
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -DBIT_WIDTH=8 -DDIM_M=${m} -DDIM_K=${k} -DDIM_N=${n} -c $< -o ${@F}
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang++ ${PEANOWRAP2_FLAGS} -fno-unroll-loops -DBIT_WIDTH=8 -DDIM_M=${m} -DDIM_K=${k} -DDIM_N=${n} -c $< -o ${@F}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// (c) Copyright 2024 Advanced Micro Devices, Inc.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// REQUIRES: ryzen_ai, chess
// REQUIRES: ryzen_ai, peano
//
// RUN: make -f %S/Makefile clean
// RUN: make -f %S/Makefile
Expand Down

0 comments on commit f4b52e9

Please sign in to comment.