You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem happened when we link Netlib BLAS and use oneMKL backend with compile-time dispatching. If we link -lonemkl_blas_xxx before -lcblas then cblas_gemm function (from Netlib) doesn't work correctly. We don't see any errors or warnings, but the output matrix doesn't even changed after test.
build the reproducer with the following string: icpx -fsycl -I${CBLASROOT}/include/ -I${ONEMKLROOT}/include/ gemm_usm.cpp -o gemm_usm.out -L${ONEMKLROOT}/lib -lonemkl_blas_mklcpu -L${CBLASROOT}/lib/ -lcblas
We can get the correct output in case of link line: icpx -fsycl -I${CBLASROOT}/include/ -I${ONEMKLROOT}/include/ gemm_usm.cpp -o gemm_usm.out -L${CBLASROOT}/lib/ -lcblas -L${ONEMKLROOT}/lib -lonemkl_blas_mklcpu or icpx -fsycl -I${CBLASROOT}/include/ -I${ONEMKLROOT}/include/ gemm_usm.cpp -o gemm_usm.out -L${ONEMKLROOT}/lib -lonemkl -L${CBLASROOT}/lib/ -lcblas
The text was updated successfully, but these errors were encountered:
@dnhsieh-intel I know you fixed the symbol conflict issue between BLAS CPU backends and Netlib reference library in #251. However, this looks like we still have some issues for some cases. Do you want to take a look at this one?
Summary
This problem happened when we link Netlib BLAS and use oneMKL backend with compile-time dispatching. If we link -lonemkl_blas_xxx before -lcblas then cblas_gemm function (from Netlib) doesn't work correctly. We don't see any errors or warnings, but the output matrix doesn't even changed after test.
Version
latest, git hash 45c43ed
Environment
Steps to reproduce
reproducer.zip
Observed behavior
Output:
C[0] = 1 C[1] = 1 C[2] = 1 C[3] = 1 C[4] = 1 C[5] = 1 C[6] = 1 C[7] = 1 C[8] = 1 C[9] = 1
Expected behavior
Output:
C[0] = 1.58397 C[1] = 1.69333 C[2] = 0.511891 C[3] = 0.30601 C[4] = 0.239454 C[5] = 1.61384 C[6] = 0.5664 C[7] = 1.13597 C[8] = 2.24034 C[9] = 1.33806
We can get the correct output in case of link line:
icpx -fsycl -I${CBLASROOT}/include/ -I${ONEMKLROOT}/include/ gemm_usm.cpp -o gemm_usm.out -L${CBLASROOT}/lib/ -lcblas -L${ONEMKLROOT}/lib -lonemkl_blas_mklcpu
oricpx -fsycl -I${CBLASROOT}/include/ -I${ONEMKLROOT}/include/ gemm_usm.cpp -o gemm_usm.out -L${ONEMKLROOT}/lib -lonemkl -L${CBLASROOT}/lib/ -lcblas
The text was updated successfully, but these errors were encountered: