Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cascade matrix multiplication test with Peano #1856

Merged
merged 10 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading