Merge "Fix lock contention in Attention"