Skip to content

Commit 241168c

Browse files
digantdesaifacebook-github-bot
authored andcommitted
[ET][XNNPACK] Add support for quantized LeakyReLU (pytorch#104309)
Summary: Pull Request resolved: pytorch#104309 X-link: pytorch/executorch#1 Also adds support for backend_config Test Plan: `buck test fbcode//mode/dev-nosan fbcode//executorch/backends/xnnpack/test:` Reviewed By: mcr229 Differential Revision: D47043207 fbshipit-source-id: 3e2f7b614713ae5c3fba6ea3056376f15826de17
1 parent 77642da commit 241168c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

torch/ao/quantization/backend_config/executorch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,13 @@ def _get_share_qparams_ops_configs() -> List[BackendPatternConfig]:
350350
F.max_pool2d,
351351
F.relu,
352352
F.relu6,
353+
F.leaky_relu,
354+
F.leaky_relu_,
353355
torch.nn.AdaptiveAvgPool2d,
354356
torch.nn.MaxPool2d,
355357
torch.nn.ReLU6,
356358
torch.nn.Hardtanh,
359+
torch.nn.LeakyReLU,
357360
torch.flatten,
358361
torch.mean,
359362
torch.squeeze,
@@ -364,6 +367,7 @@ def _get_share_qparams_ops_configs() -> List[BackendPatternConfig]:
364367
"relu_",
365368
"squeeze",
366369
"squeeze_",
370+
"leaky_relu",
367371
]
368372
share_qparams_op_configs: List[BackendPatternConfig] = []
369373
for op in share_qparams_ops:

0 commit comments

Comments
 (0)