mirror of
https://github.com/amd/blis.git
synced 2026-05-11 17:50:00 +00:00
Merge "Fix a bug in bench_gemm.c" into amd-staging-milan-3.1
This commit is contained in:
@@ -172,16 +172,16 @@ int main( int argc, char** argv )
|
||||
// Since this bench app is run on logs generated by AOCL trace logs
|
||||
// - we have relaxed the checks on the input parameters.
|
||||
|
||||
// if A is transpose - A(lda x m), lda = max(1,k)
|
||||
// if A is non-transpose - A (lda x k), lda = max(1,m)
|
||||
// if B is transpose - B (ldb x k), ldb = max(1,n)
|
||||
// if B is non-transpose - B (ldb x n), ldb = max(1,k)
|
||||
// C is ldc x n - ldc = max(1, m)
|
||||
if(transa) lda = k;
|
||||
// if A is transpose - A(lda x m), lda >= max(1,k)
|
||||
// if A is non-transpose - A (lda x k), lda >= max(1,m)
|
||||
// if B is transpose - B (ldb x k), ldb >= max(1,n)
|
||||
// if B is non-transpose - B (ldb x n), ldb >= max(1,k)
|
||||
// C is ldc x n - ldc >= max(1, m)
|
||||
//if(transa) lda = k; // We will end up overwriting lda
|
||||
bli_set_dims_with_trans( transa, m, k, &m_trans, &n_trans);
|
||||
bli_obj_create( dt, m_trans, n_trans, 1, lda, &a);
|
||||
|
||||
if(transb) ldb = n;
|
||||
//if(transb) ldb = n; // we will end up overwriting ldb, ldb >= n
|
||||
bli_set_dims_with_trans( transb, k, n, &m_trans, &n_trans);
|
||||
bli_obj_create( dt, m_trans, n_trans, 1, ldb, &b);
|
||||
|
||||
@@ -197,11 +197,17 @@ int main( int argc, char** argv )
|
||||
// Since this bench app is run on logs generated by AOCL trace logs
|
||||
// - we have relaxed the checks on the input parameters.
|
||||
|
||||
if(transa) lda = m;
|
||||
// if A is transpose - A(k x lda), lda >= max(1,m)
|
||||
// if A is non-transpose - A (m x lda), lda >= max(1,k)
|
||||
// if B is transpose - B (n x ldb), ldb >= max(1,k)
|
||||
// if B is non-transpose - B (k x ldb ), ldb >= max(1,n)
|
||||
// C is m x ldc - ldc >= max(1, n)
|
||||
|
||||
//if(transa) lda = m; // this will overwrite lda
|
||||
bli_set_dims_with_trans(transa, m, k, &m_trans, &n_trans);
|
||||
bli_obj_create( dt, m_trans, n_trans, lda, 1, &a);
|
||||
|
||||
if(transb) ldb = k;
|
||||
//if(transb) ldb = k; // this will overwrite ldb
|
||||
bli_set_dims_with_trans(transb, k, n, &m_trans, &n_trans);
|
||||
bli_obj_create( dt, m_trans, n_trans, ldb, 1, &b);
|
||||
|
||||
@@ -213,15 +219,16 @@ int main( int argc, char** argv )
|
||||
printf("Invalid storage scheme\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifndef CBLAS
|
||||
#ifndef BLIS // Incase if we are using blis interface we don't have to check for col-storage.
|
||||
#ifndef CBLAS
|
||||
if(bli_obj_col_stride(&c) == 1)
|
||||
{
|
||||
printf("BLAS APIs doesn't support row-storage: Enable CBLAS\n");
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef AOCL_MATRIX_INITIALISATION
|
||||
bli_randm( &a );
|
||||
bli_randm( &b );
|
||||
|
||||
Reference in New Issue
Block a user