cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

adnauseam
Journeyman III

clAmdBlas unknown error code with dtsrm

Hi,

I want to compare some computation times with Blas (with openmp) and clAmdBlas and there I encounter a difficulty:

I use the function clAmdBlasDtrsm() and compare with dtrsm() from blas and all is ok with up to around 7500 right hand sides.

I testet also the found solutions and they were equal.

When I try more (e.g 10000 rhs) I get a failure -1021 which I cannot find in cl.h and not in clAmdBlas.h (and also nowhere else).

The original blas-dtrsm() has no problems.

Could you help me? What says this error code? What is the reason for the failure?

The important part (as I think) of the code is following:

  bufferA = clCreateBuffer(ctx, CL_MEM_READ_ONLY, N * lda*sizeof(*AA),

                                 NULL, &err);

  bufferX = clCreateBuffer(ctx, CL_MEM_READ_WRITE, m*n * sizeof(*BB),

                                 NULL, &err);

   err = clEnqueueWriteBuffer(queue, bufferA, CL_TRUE, 0,

                                   N * lda * sizeof(*AA), AA, 0, NULL, NULL);

  err = clEnqueueWriteBuffer(queue, bufferX, CL_TRUE, 0,

                                   m*n * sizeof(*BB), BB, 0, NULL, NULL);

  err =

    clAmdBlasDtrsm(order, side, uplo, transA, diag, m, n, alpha,

                       bufferA, lda, bufferX, ldb,

                       numcommandqueues, &queue, 0,

                           NULL, &event);

Thanks for your help in advance

(edit: typo)

0 Likes
1 Solution

Hi,

Can you provide some details? what library version? what OS? what GPU? what Catalyst version?

What is the size of your A matrix?

An error of -1021 means 'clAmdBlasInvalidMatB' and this is from clAmdBlas.h. So it says your matrix B is invalid. Please check if all your parameters are right and you are within memory limits.

If you still think something is wrong, it would help if you can attach a sample code to help us reproduce the issue.

View solution in original post

0 Likes
3 Replies
himanshu_gautam
Grandmaster

TRSM used to have some issues - as much as I know.

I am not sure if this has been resolved now.

Will ask the BLAS team to look into this thread.

0 Likes

Hi,

Can you provide some details? what library version? what OS? what GPU? what Catalyst version?

What is the size of your A matrix?

An error of -1021 means 'clAmdBlasInvalidMatB' and this is from clAmdBlas.h. So it says your matrix B is invalid. Please check if all your parameters are right and you are within memory limits.

If you still think something is wrong, it would help if you can attach a sample code to help us reproduce the issue.

0 Likes

Hi,

it seems I misread sth. in clAmdBlas.h.

With this error-meaning I figured out, that I forgot to check clCreateBuffer() which has an error 'CL_INVALID_BUFFER_SIZE' when my Right-Hand-side gets too big.

Thanks for your help.

0 Likes