Tiny fix DeepseekScalingRotaryEmbedding always use forward_native (#5406)

This commit is contained in:
fzyzcjy
2025-04-15 16:33:47 +08:00
committed by GitHub
parent 8aab7fdb21
commit 15e91d721b

View File

@@ -649,7 +649,7 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbedding):
return self.forward_native(*args, **kwargs)
def forward(self, *args, **kwargs):
if torch._dynamo.is_compiling:
if torch.compiler.is_compiling():
return self.forward_native(*args, **kwargs)
if _is_cuda_available:
return self.forward_cuda(*args, **kwargs)