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
9102d655
Unverified
Commit
9102d655
authored
Jan 09, 2024
by
Frank Lee
Committed by
GitHub
Jan 09, 2024
Browse files
[hotfix] removed unused flag (#5242)
parent
d202cc28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
colossalai/accelerator/npu_accelerator.py
colossalai/accelerator/npu_accelerator.py
+0
-3
colossalai/booster/plugin/gemini_plugin.py
colossalai/booster/plugin/gemini_plugin.py
+2
-2
No files found.
colossalai/accelerator/npu_accelerator.py
View file @
9102d655
...
...
@@ -7,11 +7,8 @@ import torch.distributed as dist
from
.base_accelerator
import
BaseAccelerator
IS_NPU_AVAILABLE
=
False
try
:
import
torch_npu
# noqa
IS_NPU_AVAILABLE
=
True
except
ImportError
:
pass
...
...
colossalai/booster/plugin/gemini_plugin.py
View file @
9102d655
...
...
@@ -12,7 +12,7 @@ from torch.optim import Optimizer
from
torch.optim.lr_scheduler
import
_LRScheduler
as
LRScheduler
from
torch.utils.data
import
DataLoader
from
colossalai.accelerator
import
IS_NPU_AVAILABLE
,
get_accelerator
from
colossalai.accelerator
import
get_accelerator
from
colossalai.checkpoint_io
import
CheckpointIndexFile
,
CheckpointIO
,
GeneralCheckpointIO
from
colossalai.checkpoint_io.utils
import
(
get_model_base_filenames
,
...
...
@@ -362,7 +362,7 @@ class GeminiPlugin(DPPluginBase):
)
->
None
:
super
().
__init__
()
assert
precision
in
SUPPORTED_PRECISION
,
f
"precision
{
precision
}
is not supported"
if
IS_NPU_AVAILABLE
:
if
get_accelerator
().
name
==
"npu"
:
assert
placement_policy
==
"static"
,
"NPU only supports static placement policy"
self
.
gemini_config
=
dict
(
chunk_config_dict
=
chunk_config_dict
,
...
...
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