cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

hemantp
Journeyman III

Including Extra kernels(user written) in addition to using clAmdBlas kernels.

Hi,

i am using the clAmdBlas kernels for some matrix computations and they work very well.

Questions:

1. how do we include extra kernels(.cl) along with code which has already clAmdBlas functions eg.sger.,sgemm etc

     i have attached some code below (is it the right way to do it??) there are errors during executions(build error and clprogrambuildinfo)

2. is it possible to call them(.cl) or kernles that the user creates as neatly as calling sger or sgemm. ?

3. please explain clAmdblasSetup(). i opened the declaration but ..?

4. why do the errors differ if i run the code on eclipse (gibberish) and on direct execution on the terminal?

5. what should i keep in mind when i am trying to include my own kernels along with clAmdBlas kernels?

Files:

in the .c file i have used Srnm2 & Sger which work perfectly fine and then i  tried adding a kernel file(nr.cl) that will calculate the norm.

the second part is where there are errors.

also nr.cl is for calculating norm.

Please Advice

Thank You

0 Likes
2 Replies
himanshu_gautam
Grandmaster

I dont understand what you mean by user-developed-kernels. The "cl_mem" object is all yours... You just need to enqueue a kernel to operate on it. THats all.

clAmdBlas does not restrict you from doing that. It is outside the purview of the BLAS library...

0 Likes
himanshu_gautam
Grandmaster

Two advices for your source-code:

1. use fopen("nr.cl", "rb") to read cl file.

2. Kernel name on host side is "nr" and inside kernel it is "qr".

I was able to run your code after fixing these on a VS12, HD 7870, SDK 2.8.1, Cat 13.6beta.

0 Likes