Results 1 to 2 of 2

Thread: Reduce the number of register

  1. #1
    Junior Member
    Join Date
    Jun 2011

    Reduce the number of register

    Hello All,

    I wrote a kernel, this kernel will execute an equation, and when I use the visual profiler I found that I cant run all available thread in parallel, for example the gpu can run 1563 thread in parallel but I can reach only 1024 due to register factor, and the profiler said that I use 26 register per thread which is high, any one can give me a hint how to reduce the number of register per thread?

    The kernel:
    Code :
    __kernel void relCalculation(const __global int* a,
                                 const __global double* fProb,
                                 const __global float* T,                             
                                 __global int* Output,
                                 const int max,
                                 const int idx,
                                 const int col,                             
                                 const double rel,
                                 const double t)
        const int i = get_global_id(0);
        if (i <= max )
             double GP = 1;
            for (int j = 0; j < col; ++j)
                GP *= pow( (1 - pow(fProb[j + idx], a[i*col + j]) ), t/T[j]);
            if ( GP >= rel)
                Output[i] = 1; 
                Output[i] = 0; 

  2. #2
    Senior Member
    Join Date
    Aug 2011

    Re: Reduce the number of register


    But, maximum parallelism doesn't mean maximum performance: the system dynamics are much more complex than that.

Similar Threads

  1. Replies: 2
    Last Post: 05-08-2012, 12:41 AM
  2. reduce the number of registers used
    By opencl_beginner in forum OpenCL
    Replies: 0
    Last Post: 12-16-2010, 05:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean