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

Commit 55e6a28

Browse files
committed
remove re-casting
1 parent 026023f commit 55e6a28

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

float8_experimental/float8_tensor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ class FromFloat8ConstrFunc(torch.autograd.Function):
5454

5555
@staticmethod
5656
def forward(ctx, tensor):
57-
return (tensor._data.to(tensor._orig_dtype) / tensor._scale).to(
58-
tensor._orig_dtype
59-
)
57+
return tensor._data.to(tensor._orig_dtype) / tensor._scale
6058

6159
@staticmethod
6260
def backward(ctx, g):

0 commit comments

Comments
 (0)