Skip to content

Commit 616e14b

Browse files
committed
feat: move the contiguous to torch compile region
1 parent aead0ef commit 616e14b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/sglang/srt/layers/rotary_embedding.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,8 @@ def _forward_triton(
14811481
num_tokens = positions.shape[-1]
14821482
cos_sin = self.cos_sin_cache[positions]
14831483
cos, sin = cos_sin.chunk(2, dim=-1)
1484+
cos = cos.contiguous()
1485+
sin = sin.contiguous()
14841486
query_shape = query.shape
14851487
key_shape = key.shape
14861488
if positions.ndim == 2:

0 commit comments

Comments
 (0)