Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 3e4d745

Browse files
committed
add no grad
1 parent 55e6a28 commit 3e4d745

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

float8_experimental/float8_linear_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def get_float8_layers(model: torch.nn.Module):
135135
return fp8_layers
136136

137137

138+
@torch.no_grad()
138139
def sync_float8_amax_and_scale_history(model: torch.nn.Module, fp8_layers=None) -> None:
139140
"""
140141
Manages the float8 amax and scale bookkeeping. In detail, it does the

0 commit comments

Comments
 (0)