File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2076,10 +2076,17 @@ def extra_repr(self) -> str:
20762076 """
20772077 Returns an alternative string representation of the object.
20782078 """
2079- return (
2080- f"in={ self .in_features } , out={ self .out_features } , bias={ self .bias is not None } , "
2081- f"trun_bits={ self .trun_bits } ,fp8_dyn={ self .fp8_dyn } ,chunk_size={ self .chunk_size } "
2082- )
2079+ repr_str = f"{ self .in_features } ,{ self .out_features } "
2080+ if self .bias is not None :
2081+ repr_str += f",bias={ self .bias is not None } "
2082+ if self .trun_bits > 0 :
2083+ repr_str += f",trun_bits={ self .trun_bits } "
2084+ if self .fp8_dyn :
2085+ repr_str += f",fp8_dyn={ self .fp8_dyn } "
2086+ if self .clamp_acc_to_dl16 :
2087+ repr_str += f",use_DL16_acc"
2088+ repr_str += f",chunk_size={ self .chunk_size } "
2089+ return repr_str
20832090
20842091
20852092class LinearFuncINT8FwdFP32Bwd (torch .autograd .Function ):
You can’t perform that action at this time.
0 commit comments