viennacl / viennacl-dev

Developer repository for ViennaCL. Visit http://viennacl.sourceforge.net/ for the latest releases.
Other
281 stars 89 forks source link

AMD SI cards - weird results #265

Open skn123 opened 6 years ago

skn123 commented 6 years ago

I have raised an issue in the vexcl repo https://github.com/ddemidov/vexcl/issues/254 and a solution was provided that solved the issue. Can a similar workaround be provided for ViennaCL also given that a lot of examples are used by vexcl also?

skn123 commented 6 years ago

Here is an example of the pronblem

naths@naths-HP-Laptop-15-bs1xx:~/build/viennacl/examples/tutorial$ ./eigen-with-viennacl

Single precision


VCL sparsematrix dimensions: 6, 5 Difference for dense matrix-vector product: 42.0595 Difference for dense matrix-vector product (Eigen->ViennaCL->Eigen): 42.0595 Difference for sparse matrix-vector product: 23.6854 Difference for sparse matrix-vector product (Eigen->ViennaCL->Eigen): 23.6854

Double precision


VCL sparsematrix dimensions: 6, 5 Difference for dense matrix-vector product: inf Difference for dense matrix-vector product (Eigen->ViennaCL->Eigen): inf Difference for sparse matrix-vector product: inf Difference for sparse matrix-vector product (Eigen->ViennaCL->Eigen): inf

!!!! TUTORIAL COMPLETED SUCCESSFULLY !!!!

naths@naths-HP-Laptop-15-bs1xx:~/build/viennacl/examples/tutorial$ ./eigen-with-viennacl

Single precision


VCL sparsematrix dimensions: 6, 5 Difference for dense matrix-vector product: 42.0595 Difference for dense matrix-vector product (Eigen->ViennaCL->Eigen): 42.0595 Difference for sparse matrix-vector product: 23.6854 Difference for sparse matrix-vector product (Eigen->ViennaCL->Eigen): 23.6854

Double precision


VCL sparsematrix dimensions: 6, 5 Difference for dense matrix-vector product: 42.0595 Difference for dense matrix-vector product (Eigen->ViennaCL->Eigen): 42.0595 Difference for sparse matrix-vector product: 23.6854 Difference for sparse matrix-vector product (Eigen->ViennaCL->Eigen): 23.6854

!!!! TUTORIAL COMPLETED SUCCESSFULLY !!!!

karlrupp commented 6 years ago

Thanks, @skn123 . This is a terrible bug on AMD's end. Launching an empty kernel after regular kernels is bogus.

I'll see what I can do in terms of a proper workaround.

skn123 commented 6 years ago

@karlrupp It will indeed be helpful. However, a temporary fix would be helpful as I need ViennaCL to run with caffe opencl. If a proper workaround is found, then I will share it with other sites / libraries also. The sad part is that the standard answer AMD gives is that "this card is not supported" (when in the README it says otherwise)

skn123 commented 6 years ago

@karlrupp any update on this? I am working to fix the OpenCL backend of Caffe also and need this fix from ViennaCL also

karlrupp commented 6 years ago

Not yet - I'll need another week or so.

skn123 commented 5 years ago

@karlrupp .. bump

skn123 commented 5 years ago

I can confirm that the fix I am using works here also