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

fix naming nit #3

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions float8_playground/float8_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
from float8_utils import E4M3, E5M2, tensor_to_scale
from float8_tensor import Float8Tensor

class float8_linear_no_bias(torch.autograd.Function):
class float8_linear(torch.autograd.Function):
"""
Like F.linear, but with X, W, and Y in float8
TODO(future) add logic for bias
"""

@staticmethod
Expand Down Expand Up @@ -120,7 +119,7 @@ def forward(self, x):
self.fp8_s_bias.fill_(tensor_to_scale(self.bias, E4M3))
maybe_b_fp8 = Float8Tensor.from_float32(self.bias, self.fp8_s_bias, E4M3)

y_fp8 = float8_linear_no_bias.apply(
y_fp8 = float8_linear.apply(
x_fp8, w_fp8, maybe_b_fp8, self.fp8_s_out, self.fp8_s_dL_dX,
self.fp8_s_dL_dW, self.fp8_s_dL_dY)

Expand Down