ROCm / clr

MIT License
85 stars 35 forks source link

Why don't we just set all the fences to dirty? #38

Open Dustray opened 6 months ago

Dustray commented 6 months ago

I noticed a lock before resetFenceDirty() in iHipWaitActiveStreams(https://github.com/ROCm/clr/commit/3c6505c2d5988050f8282f556ff654ab3b2e31a1). The question I have is why don't we just set all the fences to dirty after dispatchBarrierPacket(https://github.com/ROCm/clr/blob/b825decd422500b58e983f1a2f79c9c5f9df3cbd/rocclr/device/rocm/rocvirtual.cpp#L1053).

Would adding another lock and loop for this hurt performance?

Why can't other CacheState just set dirty like kCacheStateSystem?

Thanks and hope you answer!