Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adapt the C-level reproducer code for some recent SkylakeX AVX512 kernel issues, provided by Isuru Fernando and modified by Martin Kroeker, for usage in the utest suite * add an Intel SDE SkylakeX emulation utest run to the Azure CI matrix; a custom Docker build was required because Ubuntu image provided by Azure does not support AVX512VL instructions
- Loading branch information
1 parent
9208ab8
commit a211bc9
Showing
4 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include "openblas_utest.h" | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <cblas.h> | ||
|
||
#define LAPACK_ROW_MAJOR 101 | ||
blasint LAPACKE_dgesvd( blasint matrix_layout, char jobu, char jobvt, | ||
blasint m, blasint n, double* a, | ||
blasint lda, double* s, double* u, blasint ldu, | ||
double* vt, blasint ldvt, double* superb ); | ||
|
||
|
||
#define DATASIZE 100 | ||
|
||
double s[DATASIZE]; | ||
double u[DATASIZE*DATASIZE]; | ||
double vt[DATASIZE*DATASIZE]; | ||
double X[DATASIZE*DATASIZE]; | ||
double superb[DATASIZE]; | ||
double tmp[DATASIZE*DATASIZE]; | ||
double m[DATASIZE*DATASIZE]; | ||
|
||
CTEST(kernel_regress,skx_avx) | ||
{ | ||
double norm; | ||
int i, j, info; | ||
srand(0); | ||
for (i = 0; i < DATASIZE*DATASIZE; i++) { | ||
m[i] = (rand()+0.0)/RAND_MAX * 10; | ||
tmp[i] = m[i]; | ||
} | ||
|
||
info = LAPACKE_dgesvd( LAPACK_ROW_MAJOR, 'A', 'A', DATASIZE, DATASIZE, m, DATASIZE, | ||
s, u, DATASIZE, vt, DATASIZE, superb); | ||
|
||
for (i = 0; i < DATASIZE; i++) { | ||
for (j = 0; j < DATASIZE; j++) { | ||
u[i*DATASIZE+j] = u[i*DATASIZE+j]*s[j]; | ||
} | ||
} | ||
cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, | ||
DATASIZE, DATASIZE, DATASIZE, 1, u, DATASIZE, vt, DATASIZE, 0, X, DATASIZE); | ||
|
||
for (i = 0; i < DATASIZE*DATASIZE; i++) { | ||
X[i] = X[i] - tmp[i]; | ||
} | ||
|
||
norm = cblas_dnrm2(DATASIZE*DATASIZE, X, 1); | ||
ASSERT_DBL_NEAR_TOL(0.0, norm, 1e-10); | ||
} |