CNugteren / CLBlast

Tuned OpenCL BLAS
Apache License 2.0
1.06k stars 202 forks source link

How to use 'CLBlastSgemmBatched'? #550

Open diverger opened 4 months ago

diverger commented 4 months ago

Hi,

I'm moving from ‘cublasCgemmBatched()’ to ‘CLBlastSgemmBatched()’, for the former, the A, B and C matrix is passed as array of pointer to array. Then how the matrix should be passed to the later? How should I pass the batched A1, A2, A3..., or B1, B2, B3, ..., etc to it? Use staked matrix?

Thanks.

CNugteren commented 4 months ago

Have you looked at the API docs or the sample usage of this function? The answer to your question is in the docs:

const cl_mem a_buffer: OpenCL buffer to store the input A matrix. const size_t *a_offsets: The offsets in elements from the start of the input A matrix. const size_t a_ld: Leading dimension of the input A matrix. This value must be greater than 0.