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
5e80b2a7
Unverified
Commit
5e80b2a7
authored
Jan 19, 2024
by
Kirthi Shankar Sivamani
Committed by
GitHub
Jan 19, 2024
Browse files
Avoid using torch.compile for roll and fill_ (#609)
Signed-off-by:
Kirthi Shankar Sivamani
<
ksivamani@nvidia.com
>
parent
b4b8ae7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
transformer_engine/pytorch/fp8.py
transformer_engine/pytorch/fp8.py
+2
-2
No files found.
transformer_engine/pytorch/fp8.py
View file @
5e80b2a7
...
@@ -583,7 +583,7 @@ def _update_amax_history(amax_history: torch.Tensor) -> torch.Tensor:
...
@@ -583,7 +583,7 @@ def _update_amax_history(amax_history: torch.Tensor) -> torch.Tensor:
return
amax_history
return
amax_history
@
jit_fuser
@
torch
.
jit
.
script
def
_default_get_amax
(
def
_default_get_amax
(
amax_history
:
torch
.
Tensor
,
amax_history
:
torch
.
Tensor
,
amax_compute_algo
:
str
,
amax_compute_algo
:
str
,
...
@@ -625,7 +625,7 @@ def _compute_scaling_factor_inverse(
...
@@ -625,7 +625,7 @@ def _compute_scaling_factor_inverse(
return
torch
.
where
(
non_weight_mask
,
1.0
/
scale
,
scale_inv
)
return
torch
.
where
(
non_weight_mask
,
1.0
/
scale
,
scale_inv
)
@
jit_fuser
@
torch
.
jit
.
script
def
_fused_amax_and_scale_update
(
def
_fused_amax_and_scale_update
(
amax_history
:
torch
.
Tensor
,
amax_history
:
torch
.
Tensor
,
scale
:
torch
.
Tensor
,
scale
:
torch
.
Tensor
,
...
...
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