Updating BLIS C++ interface trsm test.

- Making A diagonally dominant to ensure that the problem at hand is solvable.

AMD-Internal: [CPUPL-3575]
Change-Id: I27cc76a212d4d10aacce880895e1e0d7532e4eb7
This commit is contained in:
Eleni Vlachopoulou
2023-10-05 12:01:58 +05:30
committed by Eleni Vlachopoulou
parent 9a2a4151ac
commit 46459a958d
2 changed files with 7 additions and 1 deletions

View File

@@ -138,7 +138,7 @@ int computeErrorM(
for ( i = 0; i < m; i ++ ) {
for ( j = 0; j < n; j ++ ) {
if ( (fabs (A( i, j )) - fabs( A_ref( i, j ))) > 0.0000001 ) {
cout << A(i,j) << A_ref(i,j);
cout << A(i,j) << A_ref(i,j)<< "\n";
ret = 1;
break;
}

View File

@@ -102,6 +102,12 @@ void test_trsm( )
allocate_init_buffer(B , m , n);
copy_buffer(B, B_ref , m ,n);
// Make A diagonally dominant to guarantee that the system has a solution.
for(int i=0; i<m; i++)
{
A[i+i*lda] = T{float(m)}*A[i+i*lda];
}
#ifdef PRINT
printmatrix(A, lda ,m,m, (char *)"A");
printmatrix(B, ldb ,m,n, (char *)"B");