GTestSuite: option to test upper case character arguments

Add cmake option to convert all character arguments to upper
case to check compliance.

AMD-Internal: [CPUPL-4499]
Change-Id: Ic18416d78f63b999a78253463cc15c32f7d444f4
This commit is contained in:
Edward Smyth
2024-02-07 09:56:30 -05:00
parent 099b9863cb
commit f3cff28838
36 changed files with 272 additions and 34 deletions

View File

@@ -139,6 +139,9 @@ if( NOT ((BLIS_ELEMENT_TYPE STREQUAL "f") OR (BLIS_ELEMENT_TYPE STREQUAL "i")) )
during CMake invokation: f, i")
endif()
# Option to enable testing with upper case character arguments in BLAS and BLIS calls.
option(TEST_UPPERCASE_ARGS "Test upper case character arguments" OFF)
if(LINUX)
if(REF_LIB)
get_filename_component(REFLIB_PATH ${REF_LIB}/.. ABSOLUTE)

View File

@@ -102,6 +102,8 @@ For threaded MKL the following OpenMP runtimes are used:
* To build the testsuite using BLAS interface, configure using `-DTEST_INTERFACE=BLAS`. [**Default**]
* To build the testsuite using CBLAS interface, configure using `-DTEST_INTERFACE=CBLAS`.
* To build the testsuite using BLIS-typed interface, configure using `-DTEST_INTERFACE=BLIS_TYPED`. Note that more tests are built for this option, due to the extended APIs.
## Test with upper case character arguments
* To test with upper case character arguments, configure using `-DTEST_UPPERCASE_ARGS=ON`. [**OFF by default**]
## Type of Data Generated in Testing
* To generate floating-point numbers in the matrices and vectors that are used in testing, configure using `-DBLIS_ELEMENT_TYPE=f`. [**Default**]
* To generate integers in the matrices and vectors that are used in testing, configure using `-DBLIS_ELEMENT_TYPE=i`. This can be useful for debugging since operating on integers should compute exact results. Note that "integer" here doesn't refer to `int` type, but on the mathematical set Z.

View File

@@ -107,6 +107,9 @@ foreach(dir ${DIRS})
target_compile_definitions(${target_name}.${dir}.${subdir} PUBLIC TEST_BLIS_TYPED)
endif()
target_compile_definitions(${target_name}.${dir}.${subdir} PUBLIC ${UKR_DEFINES})
if(TEST_UPPERCASE_ARGS)
target_compile_definitions(${target_name}.${dir}.${subdir} PUBLIC TEST_UPPERCASE_ARGS)
endif()
add_test(NAME ${target_name}.${dir}.${subdir} COMMAND ${target_name}.${dir}.${subdir})
if(REF_CBLAS STREQUAL "MKL")
set_property(TEST ${target_name}.${dir}.${subdir} PROPERTY ENVIRONMENT ${MKL_ENV})

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -66,10 +66,14 @@ static void typed_addv(char conj_x, gtint_t n, T* x, gtint_t incx, T* y, gtint_t
else
throw std::runtime_error("Error in testsuite/level1/addv.h: Invalid typename in typed_addv().");
}
template<typename T>
static void addv(char conjx, gtint_t n, T* x, gtint_t incx, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/addv.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -102,6 +102,11 @@ static void typed_axpbyv(char conj_x, gtint_t n, T alpha, T* x, gtint_t incx, T
template<typename T>
static void axpbyv(char conj_x, gtint_t n, T alpha, T* x, gtint_t incx, T beta, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
axpbyv_<T>( n, alpha, x, incx, beta, y, incy );
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -101,6 +101,11 @@ static void typed_axpyv(char conj_x, gtint_t n, T alpha, T* x, gtint_t incx, T*
template<typename T>
static void axpyv(char conj_x, gtint_t n, T alpha, T* x, gtint_t incx, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
axpyv_<T>( n, alpha, x, incx, y, incy );
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -100,6 +100,11 @@ static void typed_copyv(char conjx, gtint_t n, T* x, gtint_t incx, T* y, gtint_t
template<typename T>
static void copyv(char conjx, gtint_t n, T* x, gtint_t incx, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
copyv_<T>(n, x, incx, y, incy);
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -113,6 +113,12 @@ template<typename T>
static void dotv(char conjx, char conjy, gtint_t n,
T* x, gtint_t incx, T* y, gtint_t incy, T* rho)
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
conjy = static_cast<char>(std::toupper(static_cast<unsigned char>(conjy)));
#endif
#ifdef TEST_BLAS
dotv_<T>(n, x, incx, y, incy, rho);
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -76,6 +76,12 @@ template<typename T>
static void dotxv( char conjx, char conjy, gtint_t n, T* alpha,
T* x, gtint_t incx, T* y, gtint_t incy, T* beta, T* rho )
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
conjy = static_cast<char>(std::toupper(static_cast<unsigned char>(conjy)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/dotxv.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -71,6 +71,11 @@ static void typed_scal2v(char conj_x, gtint_t n, T alpha, T* x, gtint_t incx, T*
template<typename T>
static void scal2v(char conjx, gtint_t n, T alpha, T* x, gtint_t incx, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/scal2v.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -100,6 +100,11 @@ static void typed_scalv(char conj_alpha, gtint_t n, T alpha, T* x, gtint_t incx)
template<typename T>
static void scalv(char conj_alpha, gtint_t n, T alpha, T* x, gtint_t incx)
{
#ifdef TEST_UPPERCASE_ARGS
conj_alpha = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_alpha)));
#endif
#ifdef TEST_BLAS
scalv_<T>( n, alpha, x, incx );
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -68,6 +68,11 @@ static void typed_setv(char conjalpha, gtint_t n, T* alpha, T* x, gtint_t incx)
template<typename T>
static void setv(char conjalpha, gtint_t n, T* alpha, T* x, gtint_t incx)
{
#ifdef TEST_UPPERCASE_ARGS
conjalpha = static_cast<char>(std::toupper(static_cast<unsigned char>(conjalpha)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/setv.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -69,6 +69,11 @@ static void typed_subv(char conj_x, gtint_t n, T* x, gtint_t incx, T* y, gtint_t
template<typename T>
static void subv(char conjx, gtint_t n, T* x, gtint_t incx, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/subv.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -70,6 +70,11 @@ static void typed_xpbyv(char conj_x, gtint_t n, T* x, gtint_t incx, T beta, T* y
template<typename T>
static void xpbyv(char conj_x, gtint_t n, T* x, gtint_t incx, T beta, T* y, gtint_t incy)
{
#ifdef TEST_UPPERCASE_ARGS
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level1/xpbyv.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -135,6 +135,13 @@ template<typename T>
static void gemv( char storage, char trans, char conj_x, gtint_t m, gtint_t n,
T* alpha, T* ap, gtint_t lda, T* xp, gtint_t incx, T* beta, T* yp, gtint_t incy )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
trans = static_cast<char>(std::toupper(static_cast<unsigned char>(trans)));
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
gemv_<T>( trans, m, n, alpha, ap, lda, xp, incx, beta, yp, incy );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -143,6 +143,13 @@ template<typename T>
static void ger( char storage, char conjx, char conjy, gtint_t m, gtint_t n,
T* alpha, T* xp, gtint_t incx, T* yp, gtint_t incy, T* ap, gtint_t lda )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
conjy = static_cast<char>(std::toupper(static_cast<unsigned char>(conjy)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
ger_<T>( conjy, m, n, alpha, xp, incx, yp, incy, ap, lda );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -123,6 +123,14 @@ static void hemv( char storage, char uploa, char conja, char conjx, gtint_t n,
T* alpha, T* ap, gtint_t lda, T* xp, gtint_t incx, T* beta, T* yp,
gtint_t incy )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conja = static_cast<char>(std::toupper(static_cast<unsigned char>(conja)));
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
hemv_<T>( uploa, n, alpha, ap, lda, xp, incx, beta, yp, incy );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -111,6 +111,13 @@ template<typename T, typename Tr>
static void her( char storage, char uploa, char conj_x, gtint_t n,
Tr* alpha, T* xp, gtint_t incx, T* ap, gtint_t lda )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
her_<T>( uploa, n, alpha, xp, incx, ap, lda );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -116,6 +116,14 @@ template<typename T>
static void her2( char storage, char uploa, char conj_x, char conj_y, gtint_t n,
T* alpha, T* xp, gtint_t incx, T* yp, gtint_t incy, T* ap, gtint_t lda )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
conj_y = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_y)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
her2_<T>( uploa, n, alpha, xp, incx, yp, incy, ap, lda );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -118,6 +118,14 @@ static void symv( char storage, char uploa, char conja, char conjx, gtint_t n,
T* alpha, T* ap, gtint_t lda, T* xp, gtint_t incx, T* beta, T* yp,
gtint_t incy )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conja = static_cast<char>(std::toupper(static_cast<unsigned char>(conja)));
conjx = static_cast<char>(std::toupper(static_cast<unsigned char>(conjx)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
symv_<T>( uploa, n, alpha, ap, lda, xp, incx, beta, yp, incy );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -113,6 +113,13 @@ template<typename T>
static void syr( char storage, char uploa, char conj_x, gtint_t n, T* alpha,
T* xp, gtint_t incx, T* ap, gtint_t lda )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
syr_<T>( uploa, n, alpha, xp, incx, ap, lda );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -116,6 +116,14 @@ template<typename T>
static void syr2( char storage, char uploa, char conj_x, char conj_y, gtint_t n,
T* alpha, T* xp, gtint_t incx, T* yp, gtint_t incy, T* ap, gtint_t lda )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
conj_x = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_x)));
conj_y = static_cast<char>(std::toupper(static_cast<unsigned char>(conj_y)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
syr2_<T>( uploa, n, alpha, xp, incx, yp, incy, ap, lda );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -139,6 +139,13 @@ static void trmv( char storage, char uploa, char transa, char diaga,
testinghelpers::initone(one);
#endif
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
diaga = static_cast<char>(std::toupper(static_cast<unsigned char>(diaga)));
#endif
#ifdef TEST_BLAS
if(( storage == 'c' || storage == 'C' ))
if( *alpha == one )

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -139,6 +139,13 @@ static void trsv( char storage, char uploa, char transa, char diaga,
testinghelpers::initone(one);
#endif
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
diaga = static_cast<char>(std::toupper(static_cast<unsigned char>(diaga)));
#endif
#ifdef TEST_BLAS
if(( storage == 'c' || storage == 'C' ))
if( *alpha == one )

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -151,6 +151,13 @@ template<typename T>
static void gemm( char storage, char transa, char transb, gtint_t m, gtint_t n, gtint_t k,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
gemm_<T>( transa, transb, m, n, k, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -440,6 +440,15 @@ template<typename T>
static void gemm_compute( char storage, char transa, char transb, char packa, char packb, gtint_t m, gtint_t n, gtint_t k, T* alpha,
T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
packa = static_cast<char>(std::toupper(static_cast<unsigned char>(packa)));
packb = static_cast<char>(std::toupper(static_cast<unsigned char>(packb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
gemm_compute_<T>( transa, transb, packa, packb, m, n, k, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -159,6 +159,14 @@ template<typename T>
static void gemmt( char storage, char uplo, char transa, char transb, gtint_t n, gtint_t k,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
gemmt_<T>( uplo, transa, transb, n, k, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -151,6 +151,15 @@ template<typename T>
static void hemm( char storage, char side, char uplo, char conja, char transb, gtint_t m, gtint_t n,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
side = static_cast<char>(std::toupper(static_cast<unsigned char>(side)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
conja = static_cast<char>(std::toupper(static_cast<unsigned char>(conja)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
hemm_<T>( side, uplo, m, n, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -142,6 +142,14 @@ template<typename T, typename RT = typename testinghelpers::type_info<T>::real_t
static void her2k( char storage, char uplo, char transa, char transb, gtint_t m, gtint_t k,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, RT* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
her2k_<T>( uplo, transa, m, k, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -132,6 +132,13 @@ template<typename T, typename RT = typename testinghelpers::type_info<T>::real_t
static void herk( char storage, char uplo, char transa, gtint_t m, gtint_t k,
RT* alpha, T* ap, gtint_t lda, RT* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
herk_<T>( uplo, transa, m, k, alpha, ap, lda, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -159,6 +159,15 @@ template<typename T>
static void symm( char storage, char side, char uplo, char conja, char transb, gtint_t m, gtint_t n,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
side = static_cast<char>(std::toupper(static_cast<unsigned char>(side)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
conja = static_cast<char>(std::toupper(static_cast<unsigned char>(conja)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
symm_<T>( side, uplo, m, n, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -150,6 +150,14 @@ template<typename T>
static void syr2k( char storage, char uplo, char transa, char transb, gtint_t m, gtint_t k,
T* alpha, T* ap, gtint_t lda, T* bp, gtint_t ldb, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
syr2k_<T>( uplo, transa, m, k, alpha, ap, lda, bp, ldb, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -141,6 +141,13 @@ template<typename T>
static void syrk( char storage, char uplo, char transa, gtint_t m, gtint_t k,
T* alpha, T* ap, gtint_t lda, T* beta, T* cp, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
uplo = static_cast<char>(std::toupper(static_cast<unsigned char>(uplo)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
syrk_<T>( uplo, transa, m, k, alpha, ap, lda, beta, cp, ldc );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -154,6 +154,15 @@ template<typename T>
static void trmm( char storage, char side, char uploa, char transa, char diaga,
gtint_t m, gtint_t n, T *alpha, T *ap, gtint_t lda, T *bp, gtint_t ldb )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
side = static_cast<char>(std::toupper(static_cast<unsigned char>(side)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
diaga = static_cast<char>(std::toupper(static_cast<unsigned char>(diaga)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
trmm_<T>( side, uploa, transa, diaga, m, n, alpha, ap, lda, bp, ldb );

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -126,6 +126,16 @@ static void trmm3( char storage, char side, char uploa, char transa, char diaga,
char transb, gtint_t m, gtint_t n, T *alpha, T *ap, gtint_t lda,
T *bp, gtint_t ldb, T *beta, T *c, gtint_t ldc )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
side = static_cast<char>(std::toupper(static_cast<unsigned char>(side)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
diaga = static_cast<char>(std::toupper(static_cast<unsigned char>(diaga)));
transb = static_cast<char>(std::toupper(static_cast<unsigned char>(transb)));
#endif
#ifdef TEST_BLAS
throw std::runtime_error("Error in testsuite/level3/trmm3.h: BLAS interface is not available.");
#elif TEST_CBLAS

View File

@@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -154,6 +154,15 @@ template<typename T>
static void trsm( char storage, char side, char uploa, char transa, char diaga,
gtint_t m, gtint_t n, T *alpha, T *ap, gtint_t lda, T *bp, gtint_t ldb )
{
#ifdef TEST_UPPERCASE_ARGS
storage = static_cast<char>(std::toupper(static_cast<unsigned char>(storage)));
side = static_cast<char>(std::toupper(static_cast<unsigned char>(side)));
uploa = static_cast<char>(std::toupper(static_cast<unsigned char>(uploa)));
transa = static_cast<char>(std::toupper(static_cast<unsigned char>(transa)));
diaga = static_cast<char>(std::toupper(static_cast<unsigned char>(diaga)));
#endif
#ifdef TEST_BLAS
if( storage == 'c' || storage == 'C' )
trsm_<T>( side, uploa, transa, diaga, m, n, alpha, ap, lda, bp, ldb );