cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mohit2710
Journeyman III

trying to understand the MatrixMultiplication prog

Hi,

I am a college student and a newbie to this opencl programming...

I was trying to understand the matrix multiplication prog given in ATI samples....

1. The main problem that I have been encountering is to understand the blocksize which is by default taken to be 8. I really couldn't understand the importance of blocksize,what it does and how would changing the blocksize affect the timing considerations...

2. The kernel file : I was tring to understand the kernel file but I would appreciate if someone could tell how to go about understanding the file....

Any type of help will be greatly appreciated..

0 Likes
3 Replies
rbanger
Adept I

Just try and add some printfs in the opencl kernel *.cl file to understand the code. U can add printfs in the Linux systems only. Printf's in the kernel code in MS Visual studio didn't work for me.

default 8 probably is taken to illustrate the local thread concepts. It has nothing to do with matrix multiplication.

0 Likes

Originally posted by: rbanger Just try and add some printfs in the opencl kernel *.cl file to understand the code. U can add printfs in the Linux systems only. Printf's in the kernel code in MS Visual studio didn't work for me.

 

Okay -- I got this to work.  You have to run on the CPU device though.  It doesn't work on the GPU device.

 

Nice to have at least this to look inside a running kernel file.

0 Likes

Ya...this works...thank you very much...

Now it will make easier to understand the code....

earlier i was trying the 'std::cout' command which was giving an error...

but printf works fine...

0 Likes