Commit eb3ed5b2 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing SPMV benchmark.

parent ea47d656
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -672,7 +672,7 @@ void tnlCSRMatrix< Real, Device, Index >::spmvCudaVectorized( const InVector& in
         if( inWarpIdx < 2 ) aux[ threadIdx.x ] += aux[ threadIdx.x + 2 ];
      if( warpSize >= 2 )
         if( inWarpIdx < 1 ) aux[ threadIdx.x ] += aux[ threadIdx.x + 1 ];
      __syncthreads(); // TODO: I am not sure why
      __syncthreads(); // TODO: I am not sure why - aux must be volatile

      if( inWarpIdx == 0 )
         outVector[ row ] = aux[ threadIdx.x ];
+2 −2
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ bool setupBenchmark( const tnlParameterContainer& parameters )
         cusparseDestroy( cusparseHandle );

         cout << " done.   \r";
         cudaCSRMatrix.setCudaKernelType( CSRMatrixCudaType::scalar );
         /*cudaCSRMatrix.setCudaKernelType( CSRMatrixCudaType::scalar );
         benchmarkMatrix( cudaCSRMatrix,
                          cudaX,
                          cudaB,
@@ -524,7 +524,7 @@ bool setupBenchmark( const tnlParameterContainer& parameters )
                          stopTime,
                          baseline,
                          verbose,
                          logFile );
                          logFile );*/
      }
      cudaCSRMatrix.reset();
#endif