Skip to content

Commit 796e010

Browse files
committed
Add conditional compilation for zen4 calls to AOCL-BLAS
If AOCL-BLAS is compiled with "auto" on Zen3 it does not include the zen4 functions, so compilation errors occur for the *zen4* function calls. Using the BLIS_KERNELS_ZEN4 define in blis.h we can make these calls conditional to zen4 support actually available in AOCL-BLAS
1 parent ddf0dc7 commit 796e010

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/base/flamec/blis/2/bl1_gemv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void bl1_dgemv_blas( trans1_t transa, integer m, integer n, double* alpha, doubl
442442
*beta,
443443
y, incy );
444444
#else
445-
#if FLA_ENABLE_AOCL_BLAS
445+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
446446
/* Use direct single threaded BLIS kernel */
447447
aocl_fla_init();
448448
if ( FLA_IS_MIN_ARCH_ID( FLA_ARCH_AVX512 ) && incx > 0 && incy > 0 )

src/map/lapack2flamec/f2c/c/dlarf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void dlarf_(char *side, integer *m, integer *n, doublereal *v, integer *incv, do
295295
{
296296
/* Process in a single call */
297297
/* w(1:lastc,1) := C(1:lastv,1:lastc)**T * v(1:lastv,1) */
298-
#if FLA_ENABLE_AOCL_BLAS
298+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
299299
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *incv > 0)
300300
{
301301
/* Use direct single threaded BLIS kernel */
@@ -376,7 +376,7 @@ void dlarf_(char *side, integer *m, integer *n, doublereal *v, integer *incv, do
376376
else
377377
{
378378
/* w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1) */
379-
#if FLA_ENABLE_AOCL_BLAS
379+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
380380
aocl_fla_init();
381381
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *incv > 0)
382382
{

src/map/lapack2flamec/f2c/c/dlarft.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void dlarft_(char *direct, char *storev, integer *n, integer *k, doublereal *v,
278278
i__2 = j - i__;
279279
i__3 = i__ - 1;
280280
d__1 = -tau[i__];
281-
#if FLA_ENABLE_AOCL_BLAS
281+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
282282
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512))
283283
{
284284
bli_dgemv_t_zen4_int(BLIS_CONJUGATE, BLIS_NO_CONJUGATE, i__2, i__3, &d__1,
@@ -315,7 +315,7 @@ void dlarft_(char *direct, char *storev, integer *n, integer *k, doublereal *v,
315315
i__2 = i__ - 1;
316316
i__3 = j - i__;
317317
d__1 = -tau[i__];
318-
#if FLA_ENABLE_AOCL_BLAS
318+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
319319
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *ldv > 0)
320320
{
321321
bli_dgemv_n_zen4_int_40x2_st(BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, i__2,
@@ -387,7 +387,7 @@ void dlarft_(char *direct, char *storev, integer *n, integer *k, doublereal *v,
387387
i__1 = *n - *k + i__ - j;
388388
i__2 = *k - i__;
389389
d__1 = -tau[i__];
390-
#if FLA_ENABLE_AOCL_BLAS
390+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
391391
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512))
392392
{
393393
bli_dgemv_t_zen4_int(BLIS_CONJUGATE, BLIS_NO_CONJUGATE, i__1, i__2,
@@ -424,7 +424,7 @@ void dlarft_(char *direct, char *storev, integer *n, integer *k, doublereal *v,
424424
i__1 = *k - i__;
425425
i__2 = *n - *k + i__ - j;
426426
d__1 = -tau[i__];
427-
#if FLA_ENABLE_AOCL_BLAS
427+
#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
428428
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *ldv > 0)
429429
{
430430
bli_dgemv_n_zen4_int_40x2_st(BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, i__1,

0 commit comments

Comments
 (0)