support npu

This commit is contained in:
djw 2025-07-21 12:26:14 +00:00
parent dd0e41b3b8
commit 7d51a13c9b
34 changed files with 14004 additions and 5626 deletions

View file

@ -1,5 +1,8 @@
import torch
import flashinfer
try:
import flashinfer
except:
Warning("flashinfer not found, if you are using npu, ignore this.")
import gc
try:
from flash_attn import flash_attn_with_kvcache