Unverified Commit 4e67b2a8 authored by ver217's avatar ver217 Committed by GitHub
Browse files

fix chunk move device (#1158)

parent 07f9c781
...@@ -455,7 +455,7 @@ class ChunkManager: ...@@ -455,7 +455,7 @@ class ChunkManager:
chunk (Chunk): the chunk to move to target device chunk (Chunk): the chunk to move to target device
device (torch.device): target device device (torch.device): target device
""" """
if chunk.data.device == device: if chunk.device_type == device.type:
return return
if chunk.can_move_device and not chunk.is_empty: if chunk.can_move_device and not chunk.is_empty:
self.total_mem[chunk.device_type] -= chunk.mem self.total_mem[chunk.device_type] -= chunk.mem
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment