ThreadSync FindConflict buffer problem

Hello In the FindConflict function of ThreadSync, IsSinglePoint instead of eval_set.min and max is used to determine whether indexes are the same. Are you worried that even if min max is the same, the access order is reversed?

Hello,

here is a example:Synchronization introduced because IsSinglePoint cannot be determined after the size of the for loop is substituted

allocate a = “shared”

for i 40 {

a[threadidx.x * 40 + i] = b[threadidx.x * 40 + i]

}

@tir.tvm_storage_sync(“shared”, dtype=int32)

for j 40 {

a[threadidx.x * 40 + j] = a[threadidx.x * 40 + j]

}

@yelite please ,thanks

I cannot recall much info on this part of the code. But I believe it’s done so to keep things simple. intset doesn’t contain information about access order, so the actual order can be arbitrary. In order to make this pass avoid the sync in your example, more contextual information needs to be passed. Maybe it’s easier to have a pass before to merge two loops.

Merge two loops is necessary. I get it.Thank you for your answer.