Closed haruhi55 closed 1 month ago
Tested on A100, for the below test case:
test_row_major_store<float, tl::RowMajor<2, 2>, 64, 64, kSwizzled>();
The bank conflicts are reduced from:
------------------------------------------------------------- ----------- ------------
Metric Name Metric Unit Metric Value
------------------------------------------------------------- ----------- ------------
l1tex__data_bank_conflicts_pipe_lsu_mem_shared.sum 768
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_atom.sum 0
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_ld.sum 384
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_ldgsts.sum 0
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_st.sum 384
------------------------------------------------------------- ----------- ------------
to:
------------------------------------------------------------- ----------- ------------
Metric Name Metric Unit Metric Value
------------------------------------------------------------- ----------- ------------
l1tex__data_bank_conflicts_pipe_lsu_mem_shared.sum 256
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_atom.sum 0
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_ld.sum 128
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_ldgsts.sum 0
l1tex__data_bank_conflicts_pipe_lsu_mem_shared_op_st.sum 128
------------------------------------------------------------- ----------- ------------
But there are still bank conflicts.
BaseTile
in shared memory causes 8 bank conflicts.The data distribution for a single
BaseTile
according to the swizzle function used in this fix is as follows: