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
039b7ed3
Unverified
Commit
039b7ed3
authored
Aug 10, 2022
by
HELSON
Committed by
GitHub
Aug 10, 2022
Browse files
[polish] add update directory in gemini; rename AgChunk to ChunkV2 (#1432)
parent
f20cb4e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
colossalai/gemini/update/__init__.py
colossalai/gemini/update/__init__.py
+1
-0
colossalai/gemini/update/chunkv2.py
colossalai/gemini/update/chunkv2.py
+1
-1
tests/test_gemini/update/test_chunkv2.py
tests/test_gemini/update/test_chunkv2.py
+2
-2
No files found.
colossalai/gemini/update/__init__.py
0 → 100644
View file @
039b7ed3
from
.chunkv2
import
ChunkV2
colossalai/gemini/
ag_
chunk.py
→
colossalai/gemini/
update/
chunk
v2
.py
View file @
039b7ed3
...
...
@@ -8,7 +8,7 @@ from colossalai.gemini.chunk import TensorState, STATE_TRANS, TensorInfo, ChunkF
free_storage
,
alloc_storage
class
Ag
Chunk
:
class
Chunk
V2
:
def
__init__
(
self
,
chunk_size
:
int
,
process_group
:
ColoProcessGroup
,
...
...
tests/test_gemini/
chunk
/test_
ag
chunk.py
→
tests/test_gemini/
update
/test_chunk
v2
.py
View file @
039b7ed3
...
...
@@ -9,7 +9,7 @@ from colossalai.utils import free_port, get_current_device
from
colossalai.tensor
import
ProcessGroup
as
ColoProcessGroup
from
colossalai.tensor
import
ColoParameter
from
colossalai.gemini
import
TensorState
from
colossalai.gemini.
ag_chunk
import
Ag
Chunk
from
colossalai.gemini.
update
import
Chunk
V2
def
dist_sum
(
x
):
...
...
@@ -38,7 +38,7 @@ def check_euqal(param, param_cp):
def
exam_chunk_basic
(
init_device
,
keep_gathered
,
pin_memory
):
world_size
=
torch
.
distributed
.
get_world_size
()
pg
=
ColoProcessGroup
()
my_chunk
=
Ag
Chunk
(
my_chunk
=
Chunk
V2
(
chunk_size
=
1024
,
process_group
=
pg
,
dtype
=
torch
.
float32
,
...
...
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