We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdde237 commit 5e0a9b0Copy full SHA for 5e0a9b0
python/sglang/srt/layers/rotary_embedding.py
@@ -645,7 +645,18 @@ def _compute_cos_sin_cache(self) -> torch.Tensor:
645
cache = torch.cat((cos, sin), dim=-1)
646
return cache
647
648
- def forward(
+ def forward_hip(self, *args, **kwargs):
649
+ return self.forward_native(*args, **kwargs)
650
+
651
+ def forward(self, *args, **kwargs):
652
+ if torch._dynamo.is_compiling:
653
654
+ if _is_cuda_available:
655
+ return self.forward_cuda(*args, **kwargs)
656
+ else:
657
658
659
+ def forward_native(
660
self,
661
positions: torch.Tensor,
662
query: torch.Tensor,
0 commit comments