def _gen_slices(num_blocks, n_in, n_out, mask_type=MASK_EXCLUSIVE):
<EOL>slices = []<EOL>col = <NUM_LIT:0><EOL>d_in = n_in // num_blocks<EOL>d_out = n_out // num_blocks<EOL>row = d_out if mask_type == MASK_EXCLUSIVE else <NUM_LIT:0><EOL>for _ in range(num_blocks):<EOL><INDENT>row_slice = slice(row, None)<EOL>col_slice = slice(col, col + d_in)<EOL>slices.append([row_slice, col_slice])<EOL>col += d_in<EOL>row += d_out<EOL><DEDENT>return slices<EOL>
Generate the slices for building an autoregressive mask.