cyx-6 opened a new pull request, #14907:
URL: https://github.com/apache/tvm/pull/14907

   This PR introduces the causal mask for `R.nn.attention` and its cutlass 
dispatch and legalization. The `causal_mask` argument accepts 2 types of causal 
masks - "TopLeft" and "BottomRight". 
   
   For example, with `seq_len = 4`, `seq_len_kv = 2`, 
   mask for "TopLeft":
   ```
   [[1, 0],
    [1, 1],
    [1, 1],
    [1, 1]]
   ```
   mask for "BottomRight":
   ```
   [[1, 1],
    [1, 1],
    [1, 1],
    [1, 1]]
   ```
   with `seq_len = 2`, `seq_len_kv = 4`,
   mask for "TopLeft":
   ```
   [[1, 0, 0, 0],
    [1, 1, 0, 0]]
   ```
   mask for "BottomRight":
   ```
   [[1, 1, 1, 0],
    [1, 1, 1, 1]]
   ```
   
   @vinx13 @masahi @yelite 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to