3 Replies Latest reply on Dec 10, 2010 3:48 PM by LeeHowes

    Possible bug in commandQueue synchronization routines?

      flush and enqueueWaitForEvents seem not to work

      When the following code is executed after commandQueue::enqueueReadBuffer, the following output is produced:

      Begin:          Queued
      Flush:          Queued
      WaitForEvents:  Queued
      Wait:           Complete
      Finish:         Complete

      The status of the event corresponds to whether data is actually valid in the buffer, ie. if i read the buffer after enqueueWaitForEvents() the data is garbage, but if i read it after Event::wait() the data is correct.  According to my understanding, status after flush() should be Submitted, and status after enqueuWaitForEvents() should be Complete.

      This result is the same regardless of whether the commandQueue is bound to the CPU or the GPU.  Any comments or insights would be welcome.

      System: OS = RHEL 5.5; ATI Stream SDK Version = 2.2; Driver = Catalyst 10.9 with 09/27 hotfix; CPU = AMD Phenom II X4 945; GPU = ATI RV730;

      std::vector<cl::Event> read_eventv(1, read_event); fprintf(stderr, "Begin:\t\t"); print_event_status(read_event); queue.flush(); fprintf(stderr, "Flush:\t\t"); print_event_status(read_event); queue.enqueueWaitForEvents(read_eventv); fprintf(stderr, "WaitForEvents:\t"); print_event_status(read_event); read_event.wait(); fprintf(stderr, "Wait:\t\t"); print_event_status(read_event); queue.finish(); fprintf(stderr, "Finish:\t\t"); print_event_status(read_event);