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
6b3bb2c2
Commit
6b3bb2c2
authored
Mar 28, 2023
by
Xuanlei Zhao
Committed by
binmakeswell
Mar 29, 2023
Browse files
[NFC] polish code style (#3273)
parent
4cadb25b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
colossalai/fx/passes/passes_for_gpt2_test.py
colossalai/fx/passes/passes_for_gpt2_test.py
+8
-7
No files found.
colossalai/fx/passes/passes_for_gpt2_test.py
View file @
6b3bb2c2
import
inspect
from
typing
import
Any
,
Callable
,
Dict
,
List
,
Optional
import
torch
import
torch
from
torch.fx.graph_module
import
GraphModule
from
typing
import
Callable
,
List
,
Dict
,
Any
,
Optional
from
torch.fx._compatibility
import
compatibility
from
packaging
import
version
from
packaging
import
version
from
torch.fx._compatibility
import
compatibility
from
torch.fx.graph_module
import
GraphModule
from
torch.fx.node
import
Node
from
colossalai.fx.passes.adding_split_node_pass
import
balanced_split_pass
,
pipe_split
from
colossalai.fx.passes.meta_info_prop
import
TensorMetadata
from
colossalai.fx.passes.meta_info_prop
import
TensorMetadata
import
inspect
from
typing
import
List
from
colossalai.fx.passes.split_module
import
Partition
from
colossalai.fx.passes.split_module
import
Partition
from
colossalai.fx.passes.adding_split_node_pass
import
pipe_split
,
balanced_split_pass
from
torch.fx.node
import
Node
def
customized_split_pass_for_gpt2
(
gm
:
torch
.
fx
.
GraphModule
,
pp_size
:
int
,
partition_list
:
List
[
int
]):
def
customized_split_pass_for_gpt2
(
gm
:
torch
.
fx
.
GraphModule
,
pp_size
:
int
,
partition_list
:
List
[
int
]):
...
...
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