Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b269b119 authored by Guillaume Sylvand's avatar Guillaume Sylvand
Browse files

timing: add option --bigmat to choose if we allocate one big 'mat' array or if...

timing: add option --bigmat to choose if we allocate one big 'mat' array or if the runtime allocates the tile one by one
parent 015362fd
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
#endif #endif
static int RunTest(int *iparam, _PREC *dparam, double *t_); static int RunTest(int *iparam, _PREC *dparam, double *t_);
static void* morse_getaddr_null(const MORSE_desc_t *A, int m, int n)
{
return (void*)( NULL );
}
int ISEED[4] = {0,0,0,1}; /* initial seed for zlarnv() */ int ISEED[4] = {0,0,0,1}; /* initial seed for zlarnv() */
...@@ -347,6 +351,7 @@ show_help(char *prog_name) { ...@@ -347,6 +351,7 @@ show_help(char *prog_name) {
" --gpus=X Number of GPU workers (default: 0)\n" " --gpus=X Number of GPU workers (default: 0)\n"
"\n" "\n"
" --[a]sync Enable/Disable synchronous calls in wrapper function such as POTRI. (default: async)\n" " --[a]sync Enable/Disable synchronous calls in wrapper function such as POTRI. (default: async)\n"
" --[no]bigmat Allocating one big mat or plenty of small (default: bigmat)\n"
" --[no]check Check result (default: nocheck)\n" " --[no]check Check result (default: nocheck)\n"
" --[no]progress Display progress indicator (default: noprogress)\n" " --[no]progress Display progress indicator (default: noprogress)\n"
" --[no]gemm3m Use gemm3m complex method (default: nogemm3m)\n" " --[no]gemm3m Use gemm3m complex method (default: nogemm3m)\n"
...@@ -468,6 +473,7 @@ main(int argc, char *argv[]) { ...@@ -468,6 +473,7 @@ main(int argc, char *argv[]) {
iparam[IPARAM_NITER ] = 1; iparam[IPARAM_NITER ] = 1;
iparam[IPARAM_WARMUP ] = 1; iparam[IPARAM_WARMUP ] = 1;
iparam[IPARAM_CHECK ] = 0; iparam[IPARAM_CHECK ] = 0;
iparam[IPARAM_BIGMAT ] = 1;
iparam[IPARAM_VERBOSE ] = 0; iparam[IPARAM_VERBOSE ] = 0;
iparam[IPARAM_AUTOTUNING ] = 0; iparam[IPARAM_AUTOTUNING ] = 0;
iparam[IPARAM_INPUTFMT ] = 0; iparam[IPARAM_INPUTFMT ] = 0;
...@@ -512,6 +518,10 @@ main(int argc, char *argv[]) { ...@@ -512,6 +518,10 @@ main(int argc, char *argv[]) {
iparam[IPARAM_CHECK] = 1; iparam[IPARAM_CHECK] = 1;
} else if (startswith( argv[i], "--nocheck" )) { } else if (startswith( argv[i], "--nocheck" )) {
iparam[IPARAM_CHECK] = 0; iparam[IPARAM_CHECK] = 0;
} else if (startswith( argv[i], "--bigmat" )) {
iparam[IPARAM_BIGMAT] = 1;
} else if (startswith( argv[i], "--nobigmat" )) {
iparam[IPARAM_BIGMAT] = 0;
} else if (startswith( argv[i], "--inv" )) { } else if (startswith( argv[i], "--inv" )) {
iparam[IPARAM_INVERSE] = 1; iparam[IPARAM_INVERSE] = 1;
} else if (startswith( argv[i], "--noinv" )) { } else if (startswith( argv[i], "--noinv" )) {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define TIMING_H #define TIMING_H
typedef double morse_time_t; typedef double morse_time_t;
static void* morse_getaddr_null(const MORSE_desc_t *A, int m, int n);
enum iparam_timing { enum iparam_timing {
IPARAM_THRDNBR, /* Number of cores */ IPARAM_THRDNBR, /* Number of cores */
...@@ -28,6 +29,7 @@ enum iparam_timing { ...@@ -28,6 +29,7 @@ enum iparam_timing {
IPARAM_MB, /* Number of rows in a tile */ IPARAM_MB, /* Number of rows in a tile */
IPARAM_NITER, /* Number of iteration of each test */ IPARAM_NITER, /* Number of iteration of each test */
IPARAM_WARMUP, /* Run one test to load dynamic libraries */ IPARAM_WARMUP, /* Run one test to load dynamic libraries */
IPARAM_BIGMAT, /* Allocating one big mat or plenty of small */
IPARAM_CHECK, /* Checking activated or not */ IPARAM_CHECK, /* Checking activated or not */
IPARAM_VERBOSE, /* How much noise do we want? */ IPARAM_VERBOSE, /* How much noise do we want? */
IPARAM_AUTOTUNING, /* Disable/enable autotuning */ IPARAM_AUTOTUNING, /* Disable/enable autotuning */
...@@ -93,6 +95,7 @@ enum dparam_timing { ...@@ -93,6 +95,7 @@ enum dparam_timing {
int64_t Q = iparam[IPARAM_Q]; \ int64_t Q = iparam[IPARAM_Q]; \
int64_t MT = (M%MB==0) ? (M/MB) : (M/MB+1); \ int64_t MT = (M%MB==0) ? (M/MB) : (M/MB+1); \
int64_t NT = (N%NB==0) ? (N/NB) : (N/NB+1); \ int64_t NT = (N%NB==0) ? (N/NB) : (N/NB+1); \
int bigmat = iparam[IPARAM_BIGMAT]; \
int check = iparam[IPARAM_CHECK]; \ int check = iparam[IPARAM_CHECK]; \
int loud = iparam[IPARAM_VERBOSE]; \ int loud = iparam[IPARAM_VERBOSE]; \
(void)M;(void)N;(void)K;(void)NRHS; \ (void)M;(void)N;(void)K;(void)NRHS; \
...@@ -104,8 +107,12 @@ enum dparam_timing { ...@@ -104,8 +107,12 @@ enum dparam_timing {
#define PASTE_CODE_ALLOCATE_MATRIX_TILE(_desc_, _cond_, _type_, _type2_, _lda_, _m_, _n_) \ #define PASTE_CODE_ALLOCATE_MATRIX_TILE(_desc_, _cond_, _type_, _type2_, _lda_, _m_, _n_) \
MORSE_desc_t *_desc_ = NULL; \ MORSE_desc_t *_desc_ = NULL; \
if( _cond_ ) { \ if( _cond_ ) { \
MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \ if (!bigmat) \
P, Q); \ MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q, morse_getaddr_null, NULL, NULL);\
else \
MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q);\
} }
#define PASTE_CODE_FREE_MATRIX(_desc_) \ #define PASTE_CODE_FREE_MATRIX(_desc_) \
......
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