Draft: Adaptive batch size
2 unresolved threads
2 unresolved threads
Merge request reports
Activity
Filter activity
changed milestone to %Chameleon 1.4.0
added StarPU label
requested review from @faverge
assigned to @alisito
41 int task_left = m / nb - k; 42 int batch_max = chameleon_min( CHAMELEON_BATCH_SIZE, task_left ); 43 double flops = flops_zgetrf_blocked_offdiag( nb, nb, j, ws->ib ); 44 ws->batch_size = batch_max; 45 if ( j != 0 ) { 46 ws->batch_size = chameleon_min( chameleon_max( ws->flops_min / flops, 1 ), batch_max ); 47 } 48 49 if ( task_left % ws->batch_size != 0 ) { 50 ws->batch_size = chameleon_min( chameleon_ceil( task_left, task_left / ws->batch_size ), batch_max ); 51 } 52 53 // batch_mathieu = chameleon_ceil( task_left, 54 // chameleon_max( chameleon_ceil( task_left, batch_max ), 55 // ( task_left * flops ) / ws->flops_th ) ); 56 } 124 126 ws->batch_size_blas3 = ( ws->batch_size_blas3 > CHAMELEON_BATCH_SIZE ) ? CHAMELEON_BATCH_SIZE : ws->batch_size_blas3; 125 127 ws->batch_size_swap = chameleon_getenv_get_value_int( "CHAMELEON_GETRF_BATCH_SIZE_SWAP", batch_size ); 126 128 ws->batch_size_swap = ( ws->batch_size_swap > CHAMELEON_BATCH_SIZE ) ? CHAMELEON_BATCH_SIZE : ws->batch_size_swap; 129 ws->flops_min = chameleon_max( chameleon_getenv_get_value_int( "CHAMELEON_GETRF_FLOPS_MIN_BATCH", 26e6 ), 1 );
Please register or sign in to reply