5 Replies Latest reply on Oct 6, 2011 1:16 PM by evk8888

    OpenCL Thread Creation!

    evk8888
      Number of threads created when a opencl program is run?

      Hello,

      I have a basic matrix multiplication opencl code and when i run the code with gdb, i see that there is thread creation equal to the number of processing elements in the system 

       

      [New Thread 0x7ffff2c5e710 (LWP 23553)]

      [New Thread 0x7ffff285d710 (LWP 23554)]

      also if i set the max compute units variable to any number, the number of threads created is always the same (=processing elements). Is there any explanation for this and is there a way to control this creation of threads?? thanks in advance.
      evk


        • OpenCL Thread Creation!
          genaganna

           

          Originally posted by: evk8888 Hello,

          I have a basic matrix multiplication opencl code and when i run the code with gdb, i see that there is thread creation equal to the number of processing elements in the system 

          [New Thread 0x7ffff2c5e710 (LWP 23553)]

          [New Thread 0x7ffff285d710 (LWP 23554)]

          also if i set the max compute units variable to any number, the number of threads created is always the same (=processing elements). Is there any explanation for this and is there a way to control this creation of threads?? thanks in advance.
          evk

          Are you talking about CPU_MAX_COMPUTE_UNITS environmental variable?

            • OpenCL Thread Creation!
              evk8888

              Nope. I am talking about the thread creation done by opencl library when the code is run. this can be seen when we use GDB to run a executable.  There are new thread created equal to the number of compute units. This does not change even when the cpu max compute units env variable is changed.. its always equal to the max units available in the system. I hope now its a bit clear...

               

              evk.