cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mohit2710
Journeyman III

Basic opencl queries...

Hi,

I was trying to understand the matrix multiplication example given in the sdk samples....

I have some doubts..

1.  My laptop has an intel core 2 duo processor....it consists of two cores(compute units)...is there a way I can handle the two cores...that is what if I want to use only one of the cores...not the second one...

 

2. The example takes into consideration several computation and setting up times....but they are not shown in the output....how can i get the output of those times....

Any kind of help is appreciated...

 

0 Likes
21 Replies
nou
Exemplar

Basic opencl queries...

you can set enviroment variable CPU_MAX_COMPUTE_UNITS=n

0 Likes
genaganna
Journeyman III

Basic opencl queries...

Originally posted by: mohit2710 Hi,

1.  My laptop has an intel core 2 duo processor....it consists of two cores(compute units)...is there a way I can handle the two cores...that is what if I want to use only one of the cores...not the second one...

Set enviroment variable CPU_MAX_COMPUTE_UNITS to number of cores you want use.

 2. The example takes into consideration several computation and setting up times....but they are not shown in the output....how can i get the output of those times....

Any kind of help is appreciated...

These is a document in doc folder for each sample. that describes all options used for perticular sample.

0 Likes
mohit2710
Journeyman III

Basic opencl queries...

Hi,

I ran the matrix multiplication code for two 1024x1024 matrices and took two cases on my intel core 2 duo T6400 @ 2.00 GHz processor

In first case I set the no. of compute units =2  and the time came out to be 35.6 sec...

In the second case I set the no. of compute units = 1  and teh time came out to be 38 sec...

what does these results indicate....??

should the time taken not be double in the second case...??

0 Likes
genaganna
Journeyman III

Basic opencl queries...

Originally posted by: mohit2710 Hi,

 

I ran the matrix multiplication code for two 1024x1024 matrices and took two cases on my intel core 2 duo T6400 @ 2.00 GHz processor

 

In first case I set the no. of compute units =2  and the time came out to be 35.6 sec...

 

In the second case I set the no. of compute units = 1  and teh time came out to be 38 sec...

 

what does these results indicate....??

 

should the time taken not be double in the second case...??

 

Mohit2710,

      Please run for bigger matrices.

I am getting following on my Phenom Quad-core for 2048 X 2048

      1. CPU_MAX_COMPUTE_UNITS=1

              202.607 sec

       2. CPU_MAX_COMPUTE_UNITS=2

               109.014 sec

 

Kernel time includes ReadBuffer also. To measure exactly consider only kernel execution(clEnqueueNDRangeKernel).

 

Please close other applications before running this.

0 Likes
mohit2710
Journeyman III

Basic opencl queries...

Hi,

I am using ubuntu 9.04 in VMWare software...

My host operating system is xp..

I have tried to change the CPU_MAX_COMPUTE_UNITS variable...but no change in result occurs...

If i type 'env' in the terminal, it doesn't show any such variable....

Anyways, i typed 'export CPU_MAX_COMPUTE_UNITS=2' or 1 to set the variable but no change in timng occurs...

Am i doing wrong..??

Can you tell me how to exactly set this environment variable...????

 

0 Likes
genaganna
Journeyman III

Basic opencl queries...

setting environment variable is right.  but you should get this variable when  env command used.  I am not sure why it is not showing in the list. 

 

Write simple C program with reads environemnt variable and print value.

0 Likes
mohit2710
Journeyman III

Basic opencl queries...

If I type 'export CPU_MAX_COMPUTE_UNITS=2' followed by 'env', then it does show in the list..

But my problem here is that no matter how many compute units i select through the environment variable, the timing remains the same

The configuration of my computer which i am using is : Intel Xeon CPU E5405 @2.00 GHz, Quad core processor.

 

0 Likes
genaganna
Journeyman III

Basic opencl queries...

mohit2710,

               could you please install latest OpenCL SDK and run CLInfo sample?

CLInfo sample display the device information availlable on your system. It contains "Max compute units" field. Please let me know what is the  value for that field.

              You will find latest OpenCL SDK at http://developer.amd.com/gpu/ATIStreamSDK/Pages/default.aspx.

 

             Not sure what is problem on your system.

 

 

 

0 Likes
mohit2710
Journeyman III

Basic opencl queries...

On compiling ClInfo i get an error that gl.h is not found..

This file is to be provided by ATI in its SDK which is not

0 Likes