Skip to content

Commit 09dd7e0

Browse files
committed
removed redefined convert_dtype_torch2str
1 parent c3de745 commit 09dd7e0

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

auto_round_extension/qlinear.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,6 @@ def reverse_awq_order(iweights: torch.Tensor, izeros: torch.Tensor, bits: int):
7272
return iweights, izeros
7373

7474

75-
def convert_dtype_torch2str(dtype):
76-
if dtype == torch.int8:
77-
return "int8"
78-
elif dtype == torch.float:
79-
return "fp32"
80-
elif dtype == torch.float16:
81-
return "fp16"
82-
elif dtype == torch.bfloat16:
83-
return "bf16"
84-
elif isinstance(dtype, str) and dtype in ["int8", "fp32", "fp16", "bf16"]:
85-
return dtype
86-
else:
87-
assert False, "Unsupported pytorch dtype {} to str dtype".format(dtype)
88-
89-
9075
class QuantLinearAWQ(nn.Module):
9176
QUANT_TYPE = "ark_awq"
9277

0 commit comments

Comments
 (0)