4 Replies Latest reply on Feb 4, 2010 5:22 AM by Raistmer

    kernel sync via list of events - doesn't work

    Raistmer
      when I specify event from prev kernel call like this:

      err = clEnqueueNDRangeKernel(
      cq,
      half_temp_range_kernel,
      1,
      NULL,
      globalThreads,
      NULL,
      1,
      &events[1],
      &events[0]);
      I got unknown error with integer value of -57.

      such kernel call passes OK:
      err |= clFinish(cq);
      err = clEnqueueNDRangeKernel(
      cq,
      half_temp_range_kernel,
      1,
      NULL,
      globalThreads,
      NULL,
      0,
      NULL,
      &events[0]);

      What could be wrong with synching via events?
        • kernel sync via list of events - doesn't work
          nou

          -57 is CL_INVALID_EVENT_WAIT_LIST

                                               if event_wait_list is NULL and
          num_events_in_wait_list > 0, or event_wait_list is not NULL and
          num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.

          • kernel sync via list of events - doesn't work
            Raistmer
            thanks, I suppose it described elsewhere, not in possible returning error values for enqueue kernel function.
            In my situation events[0] was just NULL cause for some reason oclFFT doesn't use events in its kernel calls though function has them as arguments.
              • kernel sync via list of events - doesn't work
                genaganna

                 

                Originally posted by: Raistmer thanks, I suppose it described elsewhere, not in possible returning error values for enqueue kernel function. In my situation events[0] was just NULL cause for some reason oclFFT doesn't use events in its kernel calls though function has them as arguments.


                Raistmer,

                             Could you please post complete testcase which shows your problem?

              • kernel sync via list of events - doesn't work
                Raistmer
                I already mailed this app on to streamdeveloper@amd.com
                The current problem was:
                cl_int
                clFFT_ExecuteInterleaved( cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize, clFFT_Direction dir,
                cl_mem data_in, cl_mem data_out,
                cl_int num_events, cl_event *event_list, cl_event *event )
                {

                As one can see the call to this function suppose that it will return some event as true kernel functions do.
                But if one look at function definition:

                while(kernelInfo)
                {
                .....
                err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL);
                .....
                kernelInfo = kernelInfo->next;
                }

                One can see that kernels in this function called w/o any events.
                And don't return any events.
                That is, event field in function call will be NULL.
                I tried to make my own kernel waiting on event returned by this FFT call and got error.
                Surely kernel can't wait on NULL event.
                So problem solved now it seems.