From 4389a804b6fb38f97a4fff9ff6d38acda69e8c37 Mon Sep 17 00:00:00 2001 From: Chang Xu Date: Tue, 25 Apr 2023 16:33:31 +0800 Subject: [PATCH] Add Parallel Linear in ChannelWise Quant (#1739) --- paddleslim/quant/observers/channel_wise.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paddleslim/quant/observers/channel_wise.py b/paddleslim/quant/observers/channel_wise.py index 7d270cdd..9962af83 100644 --- a/paddleslim/quant/observers/channel_wise.py +++ b/paddleslim/quant/observers/channel_wise.py @@ -19,7 +19,12 @@ from .mse import MSEObserverLayer from .uniform import UniformObserver from paddle.quantization.factory import ObserverFactory -CHANNEL_AXIS: Dict[type, int] = {paddle.nn.Conv2D: 0, paddle.nn.Linear: 1} +CHANNEL_AXIS: Dict[type, int] = { + paddle.nn.Conv2D: 0, + paddle.nn.Linear: 1, + paddle.distributed.fleet.meta_parallel.ColumnParallelLinear: 1, + paddle.distributed.fleet.meta_parallel.RowParallelLinear: 1 +} class ChannelWiseObserver(UniformObserver): -- GitLab