Skip to content

Commit

Permalink
Update bf16 reduce max e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestcl-amd committed Jun 11, 2024
1 parent 744114c commit 440bf88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
// REQUIRES: valid_xchess_license
// REQUIRES: peano
// RUN: mkdir -p %t/data; cd %t
// RUN: aie-opt %s %vector-to-aievec% -o aievec.mlir
// RUN: aie-opt %s %vector-to-llvmir% -o llvmir.mlir
// RUN: aie-translate llvmir.mlir %llvmir-to-ll% -o dut.ll
// RUN: %PEANO_INSTALL_DIR/bin/clang %clang_aie2_args -c dut.ll -o dut.o
// RUN: xchesscc_wrapper %xchesscc_aie2_args -DTO_LLVM +w work +o work -I%S -I. %S/testbench.cc dut.o
// RUN: xca_udm_dbg --aiearch aie-ml -qf -T -P %aietools/data/aie_ml/lib/ -t "%S/../profiling.tcl ./work/a.out" >& xca_udm_dbg.stdout
// RUN: FileCheck --input-file=./xca_udm_dbg.stdout %s
// CHECK: TEST PASSED
// XFAIL: *

module {
func.func @dut(%arg0: memref<1024xbf16>, %arg1: memref<bf16>) {
memref.assume_alignment %arg0, 32 : memref<1024xbf16>
%cst_0 = arith.constant dense<0xFF80> : vector<32xbf16>
%0 = affine.for %arg2 = 0 to 1024 step 32 iter_args(%arg3 = %cst_0) -> (vector<32xbf16>) {
%cst_1 = arith.constant 0.000000e+00 : bf16
Expand Down
4 changes: 2 additions & 2 deletions test/unit_tests/aievec_tests/bf16_max_reduce/testbench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include <cstdint>
#include <cstdio>
#include <cstdlib>
void dut(bfloat16 *restrict in0, bfloat16 *restrict out0);
void dut_ref(bfloat16 *in0, bfloat16 *out0);

#ifdef TO_CPP
void dut(bfloat16 *restrict in0, bfloat16 *restrict out0);
Expand All @@ -18,6 +16,8 @@ void dut(bfloat16 *in0_allocated, bfloat16 *in0_aligned, int64_t in0_offset,
}
#endif

void dut_ref(bfloat16 *in0, bfloat16 *out0);

alignas(32) bfloat16 g_in0[IN0_SIZE];
alignas(32) bfloat16 g_out0[OUT0_SIZE];
alignas(32) bfloat16 g_out0Ref[OUT0_SIZE];
Expand Down

0 comments on commit 440bf88

Please sign in to comment.