mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-07 20:10:17 +00:00
[builder] multihead attn runtime building (#2203)
* [hotfix] correcnt cpu_optim runtime compilation * [builder] multihead attn * fix bug * fix a bug
This commit is contained in:
@@ -12,4 +12,12 @@ except ImportError:
|
||||
from colossalai.kernel.op_builder import CPUAdamBuilder
|
||||
cpu_optim = CPUAdamBuilder().load()
|
||||
|
||||
__all__ = ["fused_optim", "cpu_optim", "LayerNorm", "FusedScaleMaskSoftmax", "MultiHeadAttention"]
|
||||
try:
|
||||
from colossalai._C import multihead_attention
|
||||
except ImportError:
|
||||
from colossalai.kernel.op_builder import MultiHeadAttnBuilder
|
||||
multihead_attention = MultiHeadAttnBuilder().load()
|
||||
|
||||
__all__ = [
|
||||
"fused_optim", "cpu_optim", "multihead_attention", "LayerNorm", "FusedScaleMaskSoftmax", "MultiHeadAttention"
|
||||
]
|
||||
|
Reference in New Issue
Block a user