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
using oneAPI, LinearAlgebra, Test
functionmain()
m =2
n =2
T = ComplexF32
alpha =one(T)
beta =one(T)
A =ones(T,m,n)
dA =oneArray(A)
sA =ones(T,m,m)
sA = sA +transpose(sA)
dsA =oneArray(sA)
hA =ones(T,m,m)
hA = hA + hA'
dhA =oneArray(hA)
x =ones(T,m)
dx =oneArray(x)
y =ones(T,m)
dy =oneArray(y)
#synchronize()
BLAS.hemv!('U',alpha,hA,x,beta,y)
oneMKL.hemv!('U',alpha,dhA,dx,beta,dy)
hy =Array(dy)
@test y ≈ hy
end
Note the commented-out call to synchronize(). Without it, the calculation is wrong:
Test Failed at /home/tim/Julia/pkg/oneAPI/wip.jl:31
Expression: y ≈ hy
Evaluated: ComplexF32[5.0f0 + 0.0f0im, 5.0f0 + 0.0f0im] ≈ ComplexF32[9.0f0 + 0.0f0im, 9.0f0 + 0.0f0im]
Adding an additional synchronization (which shouldn't be necessary, as we invoke onemklChemv and thus oneapi::mkl::blas::column_major::hemv passing a SYCL queue based on the currently-active oneL0 command queue) makes the example succeed. This looks like an MKL bug?
MWE:
Note the commented-out call to
synchronize()
. Without it, the calculation is wrong:Adding an additional synchronization (which shouldn't be necessary, as we invoke
onemklChemv
and thusoneapi::mkl::blas::column_major::hemv
passing a SYCL queue based on the currently-active oneL0 command queue) makes the example succeed. This looks like an MKL bug?cc @kballeda
The text was updated successfully, but these errors were encountered: