Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
32e7f994
Unverified
Commit
32e7f994
authored
Sep 18, 2023
by
Xuanlei Zhao
Committed by
GitHub
Sep 18, 2023
Browse files
[kernel] update triton init #4740 (#4740)
parent
d151dcab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
colossalai/kernel/triton/__init__.py
colossalai/kernel/triton/__init__.py
+19
-11
No files found.
colossalai/kernel/triton/__init__.py
View file @
32e7f994
from
.context_attention
import
bloom_context_attn_fwd
,
llama_context_attn_fwd
try
:
from
.copy_kv_cache_dest
import
copy_kv_cache_to_dest
import
triton
from
.fused_layernorm
import
layer_norm
HAS_TRITON
=
True
from
.rms_norm
import
rmsnorm_forward
from
.rotary_embedding_kernel
import
rotary_embedding_fwd
from
.softmax
import
softmax
from
.token_attention_kernel
import
token_attention_fwd
__all__
=
[
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
from
.rms_norm
import
rmsnorm_forward
from
.rotary_embedding_kernel
import
rotary_embedding_fwd
from
.softmax
import
softmax
from
.token_attention_kernel
import
token_attention_fwd
__all__
=
[
"llama_context_attn_fwd"
,
"bloom_context_attn_fwd"
,
"softmax"
,
"layer_norm"
,
"rmsnorm_forward"
,
"llama_context_attn_fwd"
,
"bloom_context_attn_fwd"
,
"softmax"
,
"layer_norm"
,
"rmsnorm_forward"
,
"copy_kv_cache_to_dest"
,
"rotary_embedding_fwd"
,
"token_attention_fwd"
"copy_kv_cache_to_dest"
,
"rotary_embedding_fwd"
,
"token_attention_fwd"
]
]
except
ImportError
:
HAS_TRITON
=
False
print
(
"Triton is not installed. Please install Triton to use Triton kernels."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment