mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-24 22:42:15 +00:00
[hotfix] fix a type in ColoInitContext (#2106)
This commit is contained in:
parent
05545bfee9
commit
8e14344ec9
@ -38,7 +38,7 @@ def _convert_to_coloparam(param: torch.nn.Parameter,
|
|||||||
requires_grad = param.requires_grad
|
requires_grad = param.requires_grad
|
||||||
|
|
||||||
if param.device.type == 'meta':
|
if param.device.type == 'meta':
|
||||||
raise NotImplemented(
|
raise NotImplementedError(
|
||||||
"ColoInitContext is initializing a model with meta parameters! This is not allowed right now!")
|
"ColoInitContext is initializing a model with meta parameters! This is not allowed right now!")
|
||||||
else:
|
else:
|
||||||
# param is the global tensor.
|
# param is the global tensor.
|
||||||
|
Loading…
Reference in New Issue
Block a user