Skip to content

Commit

Permalink
add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kircle888 committed Apr 15, 2024
1 parent 923d9d2 commit 5ee0841
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def fused_rotary_position_embedding(
[[ 0.07116699, -0.90966797],
[-0.03628540, -0.20202637]]]])
"""
if (sin is None) or (cos is None):
assert (
position_ids is None
), "position_ids without sin/cos is not correctly supported now."
assert (
use_neox_rotary_style
), "rotate_half without sin/cos is not correctly supported now."

if in_dynamic_or_pir_mode():
return _C_ops.fused_rotary_position_embedding(
q,
Expand Down

0 comments on commit 5ee0841

Please sign in to comment.