Skip to content

Commit

Permalink
fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-garvey committed Jan 28, 2025
1 parent 03df917 commit 99d3a50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions sharktank/sharktank/layers/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def forward(self, x):
x = q_input.quantize(x)
if self.fake_quant:
x = x.unpack().dequant()
else:
x = x.unpack().qs

elif qdq_input is not None:
x = qdq_input.quantize(x).unpack().dequant()
Expand Down
4 changes: 1 addition & 3 deletions sharktank/sharktank/ops/qlinear_impls.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ def qlinear_tensor_scaled(
if x_layout.qs.dtype.is_floating_point or weight_layout.qs.dtype.is_floating_point:
if x_layout.qs.dtype == torch.float8_e4m3fnuz:
# assume quark
return matmul(x_layout.qs, weight_layout.qs, transpose_rhs=True).to(
torch.float16
)
return matmul(x_layout.qs, weight_layout.qs, transpose_rhs=True)
else:
return NotImplemented

Expand Down

0 comments on commit 99d3a50

Please sign in to comment.