Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c0ce8e9f authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'blaslapack_api' into 'master'

Validate first algorithm gemm cblas and blas interfaces.

See merge request solverstack/chameleon!312
parents f1cc59ee 1e33a0fd
No related branches found
No related tags found
No related merge requests found
...@@ -144,6 +144,7 @@ testing_zgemm_std( run_arg_list_t *args, int check ) ...@@ -144,6 +144,7 @@ testing_zgemm_std( run_arg_list_t *args, int check )
int hres = 0; int hres = 0;
/* Read arguments */ /* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 ); int nb = run_arg_get_int( args, "nb", 320 );
cham_trans_t transA = run_arg_get_trans( args, "transA", ChamNoTrans ); cham_trans_t transA = run_arg_get_trans( args, "transA", ChamNoTrans );
cham_trans_t transB = run_arg_get_trans( args, "transB", ChamNoTrans ); cham_trans_t transB = run_arg_get_trans( args, "transB", ChamNoTrans );
...@@ -199,12 +200,26 @@ testing_zgemm_std( run_arg_list_t *args, int check ) ...@@ -199,12 +200,26 @@ testing_zgemm_std( run_arg_list_t *args, int check )
/* Calculate the product */ /* Calculate the product */
#if defined(CHAMELEON_TESTINGS_VENDOR) #if defined(CHAMELEON_TESTINGS_VENDOR)
testing_start( &test_data ); testing_start( &test_data );
cblas_zgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB, M, N, K, cblas_zgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB, M, N, K,
CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), C, LDC ); CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), C, LDC );
testing_stop( &test_data, flops_zgemm( M, N, K ) ); testing_stop( &test_data, flops_zgemm( M, N, K ) );
#else #else
testing_start( &test_data ); testing_start( &test_data );
hres = CHAMELEON_zgemm( transA, transB, M, N, K, alpha, A, LDA, B, LDB, beta, C, LDC ); switch ( api ) {
case 1:
hres = CHAMELEON_zgemm( transA, transB, M, N, K, alpha, A, LDA, B, LDB, beta, C, LDC );
break;
case 2:
CHAMELEON_cblas_zgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB, M, N, K,
CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), C, LDC );
break;
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres; test_data.hres = hres;
testing_stop( &test_data, flops_zgemm( M, N, K ) ); testing_stop( &test_data, flops_zgemm( M, N, K ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment