Commit e51c063
committed
[bugfix] matrixgame2 causal: build block-mask cache with effective block size
The cached BlockMask was keyed/built from self.num_frame_per_block, but the
transformer blocks run with effective_num_frame_per_block (the per-call
num_frame_per_block override). Align the mask with the block size the blocks
actually use; it is part of the cache key so different sizes get distinct
entries. Verified on H100: the size-1 and size-3 masks genuinely differ, so
any forward whose effective size diverges from the default (e.g. a boundary
block of size 1) would otherwise apply the wrong attention pattern. For the
current shipped matrixgame2 configs the two sizes coincide, so output is
unchanged — this removes the latent mismatch.1 parent 69ff7ba commit e51c063
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1029 | 1029 | | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | | - | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1033 | 1035 | | |
1034 | 1036 | | |
1035 | 1037 | | |
| |||
0 commit comments