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
TransformerEngine
Commits
6af7b77d
Commit
6af7b77d
authored
Nov 03, 2025
by
zhaochao
Browse files
[DCU] Skip some tests in test_sanity.py
Signed-off-by:
zhaochao
<
zhaochao1@sugon.com
>
parent
3a5755b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
9 deletions
+57
-9
tests/pytorch/test_sanity.py
tests/pytorch/test_sanity.py
+57
-9
No files found.
tests/pytorch/test_sanity.py
View file @
6af7b77d
...
@@ -46,7 +46,7 @@ from utils import ModelConfig
...
@@ -46,7 +46,7 @@ from utils import ModelConfig
# Only run FP8 tests on supported devices.
# Only run FP8 tests on supported devices.
fp8_available
,
reason_for_no_fp8
=
FP8GlobalStateManager
.
is_fp8_available
()
fp8_available
,
reason_for_no_fp8
=
FP8GlobalStateManager
.
is_fp8_available
()
fp8_block_scaling_available
,
_
=
FP8GlobalStateManager
.
is_fp8_block_scaling_available
()
fp8_block_scaling_available
,
reason_for_no_fp8_block_scaling
=
FP8GlobalStateManager
.
is_fp8_block_scaling_available
()
mxfp8_available
,
reason_for_no_mxfp8
=
FP8GlobalStateManager
.
is_mxfp8_available
()
mxfp8_available
,
reason_for_no_mxfp8
=
FP8GlobalStateManager
.
is_mxfp8_available
()
# Record initial RNG state from script run.
# Record initial RNG state from script run.
...
@@ -378,7 +378,13 @@ def test_sanity_layernorm_linear(
...
@@ -378,7 +378,13 @@ def test_sanity_layernorm_linear(
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -436,7 +442,13 @@ def test_sanity_linear_with_zero_tokens(dtype, bs, model, fp8_recipe, fp8_model_
...
@@ -436,7 +442,13 @@ def test_sanity_linear_with_zero_tokens(dtype, bs, model, fp8_recipe, fp8_model_
num_tokens
=
bs
*
config
.
max_seqlen_q
num_tokens
=
bs
*
config
.
max_seqlen_q
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
use_fp8
=
fp8_recipe
is
not
None
use_fp8
=
fp8_recipe
is
not
None
...
@@ -525,7 +537,13 @@ def test_sanity_layernorm_mlp(
...
@@ -525,7 +537,13 @@ def test_sanity_layernorm_mlp(
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -567,7 +585,13 @@ def test_sanity_gpt(
...
@@ -567,7 +585,13 @@ def test_sanity_gpt(
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -733,7 +757,13 @@ def test_sanity_amp_and_nvfuser(dtype, fp8_recipe, model, skip_wgrad):
...
@@ -733,7 +757,13 @@ def test_sanity_amp_and_nvfuser(dtype, fp8_recipe, model, skip_wgrad):
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -763,7 +793,13 @@ def test_sanity_drop_path(dtype, fp8_recipe, model):
...
@@ -763,7 +793,13 @@ def test_sanity_drop_path(dtype, fp8_recipe, model):
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -797,7 +833,13 @@ def test_sanity_fused_qkv_params(dtype, fp8_recipe, model, skip_wgrad):
...
@@ -797,7 +833,13 @@ def test_sanity_fused_qkv_params(dtype, fp8_recipe, model, skip_wgrad):
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
@@ -831,7 +873,13 @@ def test_sanity_gradient_accumulation_fusion(dtype, fp8_recipe, model, skip_wgra
...
@@ -831,7 +873,13 @@ def test_sanity_gradient_accumulation_fusion(dtype, fp8_recipe, model, skip_wgra
config
=
model_configs
[
model
]
config
=
model_configs
[
model
]
if
fp8_recipe
is
not
None
:
if
fp8_recipe
is
not
None
:
if
not
is_fp8_supported
(
config
):
if
not
fp8_available
:
pytest
.
skip
(
reason_for_no_fp8
)
if
fp8_recipe
.
float8_block_scaling
()
and
not
fp8_block_scaling_available
:
pytest
.
skip
(
reason_for_no_fp8_block_scaling
)
if
fp8_recipe
.
mxfp8
()
and
not
mxfp8_available
:
pytest
.
skip
(
reason_for_no_mxfp8
)
if
not
config
.
is_fp8_supported
():
pytest
.
skip
(
"Model config does not support FP8"
)
pytest
.
skip
(
"Model config does not support FP8"
)
sigma
=
0.023
sigma
=
0.023
...
...
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