Skip to content

Commit

Permalink
[Pallas] Improve segment_ids API UX (#7037)
Browse files Browse the repository at this point in the history
Summary:
Adds comment for the shape of the segment_ids.

Test Plan:
Skip CI.
  • Loading branch information
alanwaketan committed May 8, 2024
1 parent 887d344 commit 5bbe5c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_xla/experimental/custom_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ def flash_attention(
k, # [batch_size, num_heads, kv_seq_len, d_model]
v, # [batch_size, num_heads, kv_seq_len, d_model]
causal=False,
q_segment_ids=None,
kv_segment_ids=None,
q_segment_ids=None, # [batch_size, q_seq_len]
kv_segment_ids=None, # [batch_size, kv_seq_len]
sm_scale=1.0,
*,
partition_spec=None,
Expand Down

0 comments on commit 5bbe5c8

Please sign in to comment.