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
04afba37
Commit
04afba37
authored
Dec 31, 2025
by
wenjh
Browse files
Enable test_attention
Signed-off-by:
wenjh
<
wenjh@sugon.com
>
parent
ea5cc27a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
tests/pytorch/attention/test_attention.py
tests/pytorch/attention/test_attention.py
+7
-5
No files found.
tests/pytorch/attention/test_attention.py
View file @
04afba37
...
...
@@ -50,6 +50,7 @@ from transformer_engine.pytorch.quantized_tensor import (
prepare_for_saving
,
restore_from_saved
,
)
from
torch.utils.cpp_extension
import
IS_HIP_EXTENSION
_current_file
=
pathlib
.
Path
(
__file__
).
resolve
()
sys
.
path
.
append
(
str
(
_current_file
.
parent
.
parent
))
...
...
@@ -65,11 +66,12 @@ from utils import (
fp8_available
,
reason_for_no_fp8
=
is_fp8_available
(
return_reason
=
True
)
fp8_attn_available
,
reason_for_no_fp8_attn
=
fp8_available
,
reason_for_no_fp8
device_compute_capability
=
get_device_compute_capability
()
if
fp8_available
and
(
device_compute_capability
<
(
9
,
0
)
or
device_compute_capability
>=
(
12
,
0
)):
fp8_attn_available
=
False
reason_for_no_fp8_attn
=
(
"FP8 attention is not supported for compute capability ="
f
" sm
{
device_compute_capability
[
0
]
*
10
+
device_compute_capability
[
1
]
}
"
if
not
IS_HIP_EXTENSION
:
if
fp8_available
and
(
device_compute_capability
<
(
9
,
0
)
or
device_compute_capability
>=
(
12
,
0
)):
fp8_attn_available
=
False
reason_for_no_fp8_attn
=
(
"FP8 attention is not supported for compute capability ="
f
" sm
{
device_compute_capability
[
0
]
*
10
+
device_compute_capability
[
1
]
}
"
)
# Reset RNG seed and states
...
...
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