Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gemm! fails for some combinations of transpose characters #41

Open
jdnz opened this issue Oct 10, 2017 · 0 comments
Open

gemm! fails for some combinations of transpose characters #41

jdnz opened this issue Oct 10, 2017 · 0 comments

Comments

@jdnz
Copy link

jdnz commented Oct 10, 2017

using OpenCL
import OpenCL.cl.CLArray
import CLBLAS

CLBLAS.setup()
device, ctx, queue = CLBLAS.get_next_compute_context()

hA = rand(5, 10) + im*rand(5, 10)
hB = rand(10, 5) + im*rand(10, 5)
hC = rand(5, 5) + im*rand(5, 5)
hC2 = rand(10, 10) + im*rand(10, 10)

A = CLArray(queue, hA)
B = CLArray(queue, hB)
C = CLArray(queue, hC)
C2 = CLArray(queue, hC2)

BLAS.gemm!('N', 'N', complex(1.0), hA, hB, complex(0.0), hC)
CLBLAS.gemm!('N', 'N', complex(1.0), A, B, complex(0.0), C)
hC ≈ cl.to_host(C) # true

BLAS.gemm!('T', 'T', complex(1.0), hA, hB, complex(0.0), hC2)
CLBLAS.gemm!('T', 'T', complex(1.0), A, B, complex(0.0), C2) # produces error CLError(code=-1016, CL_UNKNOWN_ERROR_CODE)

BLAS.gemm!('C', 'C', complex(1.0), hA, hB, complex(0.0), hC2)
CLBLAS.gemm!('C', 'C', complex(1.0), A, B, complex(0.0), C2)
hC2 ≈ cl.to_host(C2) # false

BLAS.gemm!('T', 'N', complex(1.0), hA, hA, complex(0.0), hC2)
CLBLAS.gemm!('T', 'N', complex(1.0), A, A, complex(0.0), C2) # produces error CLError(code=-1016, CL_UNKNOWN_ERROR_CODE)

Examples with real numbers also fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant