vadimdi

global buffer bug?

Discussion created by vadimdi on Feb 5, 2009
Latest reply on Feb 6, 2009 by MicahVillmow

The following kernel must write L1 value to the global buffer. For example, the starting domain 1x1 (or it may be selected inside kernel by "if_logicalz vaTid.x"..."endif"). We expect to obtain value L1 in global_buffer_ptr[1040387], but, as we can see below, the global_buffer_ptr[3] will be filled.

il_cs_2_0
dcl_num_thread_per_group 16
dcl_literal l1, 1040387, 0, 0, 0
mov r1.x,l1.x
mov g[r1.x],l1
endmain
end

; --------  Disassembly --------------------
00 ALU: ADDR(32) CNT(5)
      0  x: MOV         R0.x,  (0x000FE003, 1.457892705e-39f).x     
         y: MOV         R0.y,  0.0f     
         z: MOV         R0.z,  0.0f     
         w: MOV         R0.w,  0.0f     
01 MEM_EXPORT_WRITE: DWORD_PTR[12], R0, ELEM_SIZE(3)
END_OF_PROGRAM

Also if the address is used more than 2047, only the low 11 bits of address are in use.

The relative addressing with any register is correct.

Outcomes