-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels