mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-16 06:30:41 +00:00
[inference]fix import bug and delete down useless init (#4830)
* fix import bug and release useless init * fix * fix * fix
This commit is contained in:
@@ -3,6 +3,12 @@ try:
|
||||
|
||||
HAS_TRITON = True
|
||||
|
||||
except ImportError:
|
||||
HAS_TRITON = False
|
||||
print("Triton is not installed. Please install Triton to use Triton kernels.")
|
||||
|
||||
# There may exist import error even if we have triton installed.
|
||||
if HAS_TRITON:
|
||||
from .context_attention import bloom_context_attn_fwd, llama_context_attn_fwd
|
||||
from .copy_kv_cache_dest import copy_kv_cache_to_dest
|
||||
from .fused_layernorm import layer_norm
|
||||
@@ -23,7 +29,3 @@ try:
|
||||
"token_attention_fwd",
|
||||
"gptq_fused_linear_triton",
|
||||
]
|
||||
|
||||
except ImportError:
|
||||
HAS_TRITON = False
|
||||
print("Triton is not installed. Please install Triton to use Triton kernels.")
|
||||
|
Reference in New Issue
Block a user