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
deepspeed
Commits
a9e8325f
"tests/python/common/test_traversal.py" did not exist on "89a4cc4db214347fb6add23dbf373485f6a57499"
Unverified
Commit
a9e8325f
authored
Sep 15, 2020
by
Jeff Rasley
Committed by
GitHub
Sep 15, 2020
Browse files
add cpu-adam, reformat, add colors (#413)
parent
55ed1057
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
16 deletions
+35
-16
basic_install_test.py
basic_install_test.py
+35
-16
No files found.
basic_install_test.py
View file @
a9e8325f
import
torch
import
warnings
import
importlib
import
warnings
GREEN
=
'
\033
[92m'
RED
=
'
\033
[91m'
YELLOW
=
'
\033
[93m'
END
=
'
\033
[0m'
SUCCESS
=
f
"
{
GREEN
}
[SUCCESS]
{
END
}
"
WARNING
=
f
"
{
YELLOW
}
[WARNING]
{
END
}
"
FAIL
=
f
'
{
RED
}
[FAIL]
{
END
}
'
INFO
=
' [INFO]'
try
:
import
deepspeed
print
(
"
deepspeed successfully imported"
)
print
(
f
"
{
SUCCESS
}
deepspeed successfully imported
.
"
)
except
ImportError
as
err
:
raise
err
print
(
f
"torch install path:
{
torch
.
__path__
}
"
)
print
(
f
"torch version:
{
torch
.
__version__
}
"
)
print
(
f
"deepspeed install path:
{
deepspeed
.
__path__
}
"
)
print
(
f
"
{
INFO
}
torch install path:
{
torch
.
__path__
}
"
)
print
(
f
"
{
INFO
}
torch version:
{
torch
.
__version__
}
, torch.cuda:
{
torch
.
version
.
cuda
}
"
)
print
(
f
"
{
INFO
}
deepspeed install path:
{
deepspeed
.
__path__
}
"
)
print
(
f
"deepspeed info:
{
deepspeed
.
__version__
}
,
{
deepspeed
.
__git_hash__
}
,
{
deepspeed
.
__git_branch__
}
"
f
"
{
INFO
}
deepspeed info:
{
deepspeed
.
__version__
}
,
{
deepspeed
.
__git_hash__
}
,
{
deepspeed
.
__git_branch__
}
"
)
try
:
apex_C
=
importlib
.
import_module
(
'apex_C'
)
print
(
"apex
successfully installed"
)
print
(
f
"
{
SUCCESS
}
apex extensions
successfully installed"
)
except
Exception
as
err
:
raise
err
print
(
f
'
{
WARNING
}
apex extensions are not installed'
)
try
:
from
apex.optimizers
import
FP16_Optimizer
print
(
"
using old-style apex"
)
print
(
f
"
{
INFO
}
using old-style apex"
)
except
ImportError
:
print
(
"
using new-style apex"
)
print
(
f
"
{
INFO
}
using new-style apex"
)
try
:
importlib
.
import_module
(
'deepspeed.ops.lamb.fused_lamb_cuda'
)
print
(
'deepspe
ed lamb successfully installed.'
)
print
(
f
'
{
SUCCESS
}
fus
ed lamb successfully installed.'
)
except
Exception
as
err
:
warnings
.
warn
(
"deepspe
ed lamb is NOT installed."
)
print
(
f
"
{
WARNING
}
fus
ed lamb is NOT installed."
)
try
:
importlib
.
import_module
(
'deepspeed.ops.transformer.transformer_cuda'
)
print
(
'deepspeed
transformer kernels successfully installed.'
)
print
(
f
'
{
SUCCESS
}
transformer kernels successfully installed.'
)
except
Exception
as
err
:
warnings
.
warn
(
'deepspeed transformer kernels are NOT installed.'
)
print
(
f
'
{
WARNING
}
transformer kernels are NOT installed.'
)
try
:
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
'ignore'
)
importlib
.
import_module
(
'deepspeed.ops.sparse_attention.cpp_utils'
)
import
triton
print
(
f
'
{
SUCCESS
}
sparse attention successfully installed.'
)
except
ImportError
:
print
(
f
'
{
WARNING
}
sparse attention is NOT installed.'
)
try
:
importlib
.
import_module
(
'deepspeed.ops.
sparse_attention.cpp_utils
'
)
print
(
'deepspeed sparse attention
successfully installed.'
)
importlib
.
import_module
(
'deepspeed.ops.
adam.cpu_adam_op
'
)
print
(
f
'
{
SUCCESS
}
cpu-adam (used by ZeRO-offload)
successfully installed.'
)
except
ImportError
:
warnings
.
warn
(
'deepspeed sparse attention
is NOT installed.'
)
print
(
f
'
{
WARNING
}
cpu-adam (used by ZeRO-offload)
is NOT installed.'
)
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