Using streams
Posted: Mon Mar 31, 2014 5:16 am
Dear all,
How I can use stream in dependent routines calls, I mean by dependent that one routine need the results from the anothor. I have the following example code, but I don't get the correct results. There is any way to make it work properly.
cudaStream_t stream[2];
cudaStreamCreate( &stream[0] ) ;
cudaStreamCreate( &stream[1] ) ;
magmablasSetKernelStream(stream[0]);
magmablas_slacpy( MagmaUpperLower, M, N, d_H2s, M32, d_B, M232 );
magmablasSetKernelStream(stream[1]);
magma_sgeqrf_gpu( M2, M, d_B, M232, tau, d_T, &info);
cudaStreamDestroy( stream[0] ) ;
cudaStreamDestroy( stream[1] ) ;
Thanks
How I can use stream in dependent routines calls, I mean by dependent that one routine need the results from the anothor. I have the following example code, but I don't get the correct results. There is any way to make it work properly.
cudaStream_t stream[2];
cudaStreamCreate( &stream[0] ) ;
cudaStreamCreate( &stream[1] ) ;
magmablasSetKernelStream(stream[0]);
magmablas_slacpy( MagmaUpperLower, M, N, d_H2s, M32, d_B, M232 );
magmablasSetKernelStream(stream[1]);
magma_sgeqrf_gpu( M2, M, d_B, M232, tau, d_T, &info);
cudaStreamDestroy( stream[0] ) ;
cudaStreamDestroy( stream[1] ) ;
Thanks