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
0f7ed8c1
Unverified
Commit
0f7ed8c1
authored
Apr 24, 2022
by
ver217
Committed by
GitHub
Apr 24, 2022
Browse files
fix _post_init_method of zero init ctx (#847)
parent
2a0a427e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
colossalai/zero/init_ctx/init_context.py
colossalai/zero/init_ctx/init_context.py
+1
-1
No files found.
colossalai/zero/init_ctx/init_context.py
View file @
0f7ed8c1
...
@@ -155,7 +155,7 @@ class ZeroInitContext(InsertPostInitMethodToModuleSubClasses):
...
@@ -155,7 +155,7 @@ class ZeroInitContext(InsertPostInitMethodToModuleSubClasses):
torch
.
set_rng_state
(
self
.
cpu_rng_state
)
torch
.
set_rng_state
(
self
.
cpu_rng_state
)
torch
.
cuda
.
set_rng_state
(
self
.
cuda_rng_state
)
torch
.
cuda
.
set_rng_state
(
self
.
cuda_rng_state
)
def
_post_init_method
(
self
,
module
:
torch
.
nn
.
Module
):
def
_post_init_method
(
self
,
module
:
torch
.
nn
.
Module
,
*
args
,
**
kwargs
):
"""
"""
The function to call at the end of the constructor of each module.
The function to call at the end of the constructor of each module.
NOTE() The module may be passed to this function multiple times.
NOTE() The module may be passed to this function multiple times.
...
...
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