mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 10:34:41 +00:00
[feat] refactored extension module (#5298)
* [feat] refactored extension module * polish * polish * polish * polish * polish * polish * polish * polish * polish * polish
This commit is contained in:
@@ -190,8 +190,10 @@ class Chunk:
|
||||
def device_type(self) -> str:
|
||||
if self.chunk_temp is not None:
|
||||
return self.chunk_temp.device.type
|
||||
else:
|
||||
elif self.is_gathered or self.cuda_shard is not None:
|
||||
return get_accelerator().name
|
||||
else:
|
||||
return "cpu"
|
||||
|
||||
@property
|
||||
def payload(self) -> torch.Tensor:
|
||||
|
Reference in New Issue
Block a user