评价此页

PerRow#

class torch.ao.quantization.observer.PerRow[source]#

表示量化中的行粒度。

这是逐轴量化的特例,仅适用于 Float8 矩阵乘法,其中输入以块大小 (1, …, input.shape[-1]) 进行量化。权重以块大小 (1, weight.shape[1]) 进行量化。