Results 1 to 4 of 4

Thread: CL_INVALID_KERNEL_NAME error after edit a function

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    4

    CL_INVALID_KERNEL_NAME error after edit a function

    I'm working to improve the perfomance of a 2D FFT on images . After a benchmark ; I regconize the transpose function is the reason make the program slow , so I replace it with a more optimized one .

    But after that ; I received a return code of all the functions which work fine before
    Code :
    CL_INVALID_KERNEL_NAME
    . Except the transpose function and
    Code :
    clSetKernelArg
    in the host code ; I donít change anything else . So Iím out of idea. Hope you guys help me out

    Here is the kernel file

    The transpose function before :
    Code :
    __kernel void transpose(__global float2 *dst, __global float2* src, int n)
    {    
          unsigned int xgid = get_global_id(0);
          unsigned int ygid = get_global_id(1);
     
          unsigned int iid = ygid * n + xgid;
          unsigned int oid = xgid * n + ygid;
     
          dst[oid] = src[iid];
    }

    and the new one :

    Code :
    #define BLOCK_DIM 16
     
    __kernel void   transpose(
                 __global float2* dataout, 
                 __global float2* datain, 
                 int width, int height)
     
    // width = N (signal length) 
    // height = batch_size (number of signals in a batch)
     
    {
    // read the matrix tile into shared memory
     
    __local float2 block[BLOCK_DIM * (BLOCK_DIM + 1)] 
       unsigned int xIndex = get_global_id(0);
       unsigned int yIndex = get_global_id(1);
     
        if((xIndex < width) && (yIndex < height))
        {
                unsigned int index_in = yIndex * width + xIndex;
                           int Idin = get_local_id(1)*(BLOCK_DIM+1)+get_local_id(0);
                           block[Idin]=  datain[index_in];
        }
     
    barrier(CLK_LOCAL_MEM_FENCE);
     
    // write the transposed matrix tile to global memory
     
                 xIndex = get_group_id(1) * BLOCK_DIM + get_local_id(0);
                 yIndex = get_group_id(0) * BLOCK_DIM + get_local_id(1);
     
        if((xIndex < height) && (yIndex < width))
        {
            unsigned int index_out = yIndex * height + xIndex;
            int Idout = get_local_id(0)*(BLOCK_DIM+1)+get_local_id(1);
                    dataout[index_out] = block[Idout];
        }
     
    }

  2. #2
    Junior Member
    Join Date
    Nov 2012
    Posts
    4

    Re: CL_INVALID_KERNEL_NAME error after edit a function (upda

    Here is the log file . Seems normal with me . Is anthing wrong ?

    Code :
    expected a "]"
          __local float2 block[BLOCK_DIM * (BLOCK_DIM + 1)] ;
                               ^
     
         line 110: error:
                  expected a ")"
          __local float2 block[BLOCK_DIM * (BLOCK_DIM + 1)] ;
                                            ^
     
         line 110: error: operand
                  of "*" must be a pointer
          __local float2 block[BLOCK_DIM * (BLOCK_DIM + 1)] ;
     
    error:
              expected a ";"
              int Idout = get_local_id(0)*(BLOCK_DIM+1)+get_local_id(1);
                                                      ^

  3. #3
    Senior Member
    Join Date
    Oct 2012
    Posts
    166

    Re: CL_INVALID_KERNEL_NAME error after edit a function

    Seems linke he does not like your define. do you get any errors when compiling your code? hace you tried buildoption -Werror to make shure there are no warnings? Looks fine for me, but i downt know if threre is something worng in the define. I dont need them at the moment.

    Greetings
    clint3112

  4. #4
    Senior Member
    Join Date
    Oct 2012
    Posts
    166

    Re: CL_INVALID_KERNEL_NAME error after edit a function

    You could also check the Binary. The defined value should be in there i think

Similar Threads

  1. WebGL function error
    By g_khatwani in forum Developers Coding:Beginner
    Replies: 5
    Last Post: 08-23-2012, 02:53 AM
  2. clBuildProgram() function error...!!
    By phoebe0105 in forum OpenCL
    Replies: 3
    Last Post: 05-13-2010, 07:00 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
  •