quantize_affine_floatx¶ torchao.quantization.quantize_affine_floatx(tensor: Tensor, scale: Tensor, ebits: int, mbits: int) → Tensor[源]¶ 将 float32 高精度浮点张量量化为低精度浮点数,并将结果转换为未打包的浮点格式,其格式为 00SEEEMM (例如 fp6_e3m2),其中 S 表示符号位,e 表示指数位,m 表示尾数位