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