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
7f822a5c
Commit
7f822a5c
authored
Jan 18, 2023
by
jiaruifang
Browse files
Merge branch 'main' of
https://github.com/hpcaitech/ColossalAI
into dev0116
parents
025b482d
5db3a5bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
colossalai/fx/graph_module.py
colossalai/fx/graph_module.py
+7
-2
No files found.
colossalai/fx/graph_module.py
View file @
7f822a5c
...
@@ -22,8 +22,13 @@ if COLOGM:
...
@@ -22,8 +22,13 @@ if COLOGM:
class
ColoGraphModule
(
GraphModule
):
class
ColoGraphModule
(
GraphModule
):
def
__init__
(
self
,
root
:
Union
[
torch
.
nn
.
Module
,
Dict
[
str
,
Any
]],
graph
:
Graph
,
class_name
:
str
=
'GraphModule'
):
def
__init__
(
self
,
graph
.
set_codegen
(
ActivationCheckpointCodeGen
())
root
:
Union
[
torch
.
nn
.
Module
,
Dict
[
str
,
Any
]],
graph
:
Graph
,
class_name
:
str
=
'GraphModule'
,
ckpt_codegen
:
bool
=
True
):
if
ckpt_codegen
:
graph
.
set_codegen
(
ActivationCheckpointCodeGen
())
super
().
__init__
(
root
,
graph
,
class_name
)
super
().
__init__
(
root
,
graph
,
class_name
)
def
bind
(
self
,
ckpt_def
,
globals
):
def
bind
(
self
,
ckpt_def
,
globals
):
...
...
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