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
4e67b2a8
Unverified
Commit
4e67b2a8
authored
Jun 22, 2022
by
ver217
Committed by
GitHub
Jun 22, 2022
Browse files
fix chunk move device (#1158)
parent
07f9c781
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
colossalai/tensor/chunk.py
colossalai/tensor/chunk.py
+1
-1
No files found.
colossalai/tensor/chunk.py
View file @
4e67b2a8
...
...
@@ -455,7 +455,7 @@ class ChunkManager:
chunk (Chunk): the chunk to move to target device
device (torch.device): target device
"""
if
chunk
.
d
ata
.
devic
e
==
device
:
if
chunk
.
d
evice_typ
e
==
device
.
type
:
return
if
chunk
.
can_move_device
and
not
chunk
.
is_empty
:
self
.
total_mem
[
chunk
.
device_type
]
-=
chunk
.
mem
...
...
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