Skip to content

Commit

Permalink
fix torch_attn import (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
xibosun authored Nov 20, 2024
1 parent 9b61d76 commit 20b1a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xfuser/core/long_ctx_attention/ulysses/attn_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
from yunchang.comm.all_to_all import SeqAllToAll4D
try:
# yunchang > 0.4.0
from yunchang.ulysses.attn_layer import torch_attn
from yunchang.kernels.attention import torch_attn
except:
print(f"detect you are not use the latest yunchang. Please install yunchang>=0.4.0")
try:
from yunchang.kernels.attention import torch_attn
from yunchang.ulysses.attn_layer import torch_attn
except:
raise ImportError(f"yunchang import torch_attn error")

Expand Down

0 comments on commit 20b1a60

Please sign in to comment.