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
64d522ac
Commit
64d522ac
authored
May 14, 2025
by
wenjh
Browse files
[Workaround] multi tensor scale acc restrictions
parent
28726eaf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tests/pytorch/test_multi_tensor.py
tests/pytorch/test_multi_tensor.py
+7
-2
No files found.
tests/pytorch/test_multi_tensor.py
View file @
64d522ac
...
@@ -258,5 +258,10 @@ def test_multi_tensor_compute_scale_and_scale_inv(
...
@@ -258,5 +258,10 @@ def test_multi_tensor_compute_scale_and_scale_inv(
scale_ref
,
scale_inv_ref
,
_
=
scale_from_amax_tensor
(
scale_ref
,
scale_inv_ref
,
_
=
scale_from_amax_tensor
(
torch
.
float32
,
amax
,
fp8_dtype
,
eps
=
epsilon
,
pow_2_scales
=
pow_2_scales
torch
.
float32
,
amax
,
fp8_dtype
,
eps
=
epsilon
,
pow_2_scales
=
pow_2_scales
)
)
if
(
IS_HIP_EXTENSION
):
torch
.
testing
.
assert_close
(
scale
,
scale_ref
,
rtol
=
1e-7
,
atol
=
0
)
torch
.
testing
.
assert_close
(
scale_inv
,
scale_inv_ref
,
rtol
=
1.3e-7
,
atol
=
0
)
else
:
torch
.
testing
.
assert_close
(
scale
,
scale_ref
,
rtol
=
0
,
atol
=
0
)
torch
.
testing
.
assert_close
(
scale
,
scale_ref
,
rtol
=
0
,
atol
=
0
)
torch
.
testing
.
assert_close
(
scale_inv
,
scale_inv_ref
,
rtol
=
0
,
atol
=
0
)
torch
.
testing
.
assert_close
(
scale_inv
,
scale_inv_ref
,
rtol
=
0
,
atol
=
0
)
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