Skip to content

Commit

Permalink
LPGEMM bench enhancements
Browse files Browse the repository at this point in the history
Details:
- Moved the downscale & postop options from commmandline to
  input file.
- Now the format of the input file is as follows:
  dt_in dt_out stor transa transb op_a op_b m n k lda ldb ldc postops
- In case of no-postops, 'none' has to be passed in the place of
  postops.
- Removed duplication of mat_mul_bench_main function for bf16 APIs.
- Added a function called print_matrix for each datatype which can
  help in printing matrices while debugging.
- Added printing of ref, computed and diff values while reporting
  failure.
- Added new functions for memory allocation and freeing. Different
  types of memory allocation is chosen based on mode bench is
  running(performance or accuracy mode).

Change-Id: Ia7d740c53035bc76e578a03869590c9f04396b72
  • Loading branch information
Meghana-vankadari authored and BhaskarNallani committed Nov 9, 2023
1 parent ed052c6 commit 0c12b72
Show file tree
Hide file tree
Showing 3 changed files with 4,960 additions and 2,291 deletions.
10 changes: 0 additions & 10 deletions addon/aocl_gemm/aocl_gemm_bf16bf16f32obf16.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@ AOCL_GEMM_MATMUL(bfloat16,bfloat16,bfloat16,float,bf16bf16f32obf16)
bool is_row_major = ( ( order_use == 'r' ) || ( order_use == 'R' ) );
bool is_column_major = ( ( order_use == 'c' ) || ( order_use == 'C' ) );

// Transpose is not supported for B matrix yet.
if ( ( is_row_major == TRUE ) && ( bli_is_trans( blis_transb ) ) )
{
return; // Error.
}
else if ( ( is_column_major == TRUE ) && ( bli_is_trans( blis_transa ) ) )
{
return; // Error.
}

// Check if strides are valid for Row major inputs.
if ( ( is_row_major == TRUE ) &&
( ( bli_is_notrans( blis_transa ) && ( lda < k ) ) ||
Expand Down
Loading

0 comments on commit 0c12b72

Please sign in to comment.