You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement physical slot replication for bicyclic and tricyclic layout after
matrix multiplication.
In the bicyclic layout, we require for each 0 <= slot < numSlot, (ct, slot) is
mapped to (slot % n, slot % m). However, after computing through BSGS we can only
guarantee for all 0 <= slot < n*m this property preserves (indeed we can guarantee
more, but for the tail part it is not correct if n*m does not divide numSlot).
In this commit, we add a new relation called `periodic replication relation`
that replicate the first copy to all slots periodically. After each matrix
multiplication with CRT layouts (bicyclic, tricyclic), we compose this relation
to derive the result.
The cost of the layout switching will be up to logN rotations.
PiperOrigin-RevId: 953525822
0 commit comments