-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle patch failure -> fallback & add Copyright
- Loading branch information
Showing
21 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
from . import mha, rms_norm, rotary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
# Copyright (c) 2023, DeepLink. | ||
|
||
from .mha import DeepLinkSelfAttention, DeepLinkCrossAttention | ||
try: | ||
from .mha import DeepLinkSelfAttention, DeepLinkCrossAttention | ||
except Exception as e: | ||
print( | ||
"[deeplink_ext] mha is not implemented in diopi. Falling back to the slower implementation." | ||
) | ||
from .fallback import ( | ||
SelfAttention as DeepLinkSelfAttention, | ||
CrossAttention as DeepLinkCrossAttention, | ||
) | ||
from . import fallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
from .fallback import SelfAttention, CrossAttention |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
from .deeplink import DeepLinkRMSNorm, DeepLinkRMSNormWithNormalizedShape | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
try: | ||
from .deeplink import DeepLinkRMSNorm, DeepLinkRMSNormWithNormalizedShape | ||
except: | ||
print( | ||
"[deeplink_ext] rms_norm is not implemented in diopi. Falling back to the slower implementation." | ||
) | ||
from .fallback import RMSNorm as DeepLinkRMSNorm | ||
from . import fallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
from .fallback import RMSNorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
import torch | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
from .deeplink import DeepLinkApplyRotaryEmb, DeepLinkApplyRotaryEmbQKV_ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
try: | ||
from .deeplink import DeepLinkApplyRotaryEmb, DeepLinkApplyRotaryEmbQKV_ | ||
except: | ||
print( | ||
"[deeplink_ext] rotary is not implemented in diopi. Falling back to the slower implementation." | ||
) | ||
from .fallback import ( | ||
ApplyRotaryEmb as DeepLinkApplyRotaryEmb, | ||
ApplyRotaryEmbQKV_ as DeepLinkApplyRotaryEmbQKV_, | ||
) | ||
from . import fallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Copyright (c) 2024, DeepLink. | ||
|
||
from .fallback import ApplyRotaryEmb, ApplyRotaryEmbQKV_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters