0 Replies Latest reply on Jan 14, 2010 3:33 PM by emuller

    IL append buffers - query and reset counter?

    emuller

      Using the new Evergreen append buffers appears to be exactly the same as a UAV.  The catch is the hinden counter is persistant ... so if I append .. then read from the host, I need a way to reset the hidden counter for that UAV slot before I call the next kernel. 

      I am able to query the counter with a kernel of the sort attached.  Inc and Dec of the counter are similar.  So for reseting, I resort to a query, then an appropriate loop of inc or dec kernels ... (would be faster to put into one kernel, but things started to get strange with alloc+consume in a loop). 

      So my question is:  Is there a better way to do this?  The ISA seems to show it is GDS where the append buffer counter is located ... it would be great if I could get at this directly.  I.E. resetting the counter should not need to be done by steps of 1.

       

      il_cs_2_0 dcl_num_thread_per_group 64 dcl_literal l0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff dcl_literal l1, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff dcl_literal l2, 0x00000001, 0x00000001, 0x00000001, 0x00000001 dcl_literal l3, 0x00000000, 0x00000004, 0x00000008, 0x0000000C dcl_literal l4, 0x00000002, 0x00000004, 0x00000008, 0x0000000C dcl_raw_uav_id(0) ; consume then alloc ; am I thread 0? ieq r1.x, vaTid.x, l3.x if_logicalnz r1.x ;append_buf_consume_id(0) r0.x append_buf_alloc_id(0) r0.x append_buf_consume_id(0) r1.x ; output counter uav_raw_store_id(0) mem.x, l3.x, r0.x endif end