apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.56k stars 3.43k forks source link

[PyTorch] not implemented: ['quantized::leaky_relu'] #11451

Open wangzhenyu32 opened 2 years ago

wangzhenyu32 commented 2 years ago

Expected behavior

expect to support qunatize leaky_relu when using relay.frontend.from_pytorch import a qat model

Environment

tvm branch main for x86

Steps to reproduce

mod, params = relay.frontend.from_pytorch(jit_model, input_shapes)

File "/root/test/tvm/python/tvm/relay/frontend/pytorch.py", line 4070, in from_pytorch converter.report_missing_conversion(op_names) File "/root/test/tvm/python/tvm/relay/frontend/pytorch.py", line 3275, in report_missing_conversion raise NotImplementedError(msg) NotImplementedError: The following operators are not implemented: ['quantized::leaky_relu']

cc @yelite

petuca commented 2 years ago

Hi,

Can you provide us a reproduction for this problem? Do you have your own model for reproducing?

@wangzhenyu32

wangzhenyu32 commented 2 years ago

Hi,

Can you provide us a reproduction for this problem? Do you have your own model for reproducing?

@wangzhenyu32

Reproduction for this problem: step1: train a model use pytorch include a leaky_relu activation func. step2: qat for the trained model. step3: import the qat model to tvm frontend So sorry, I can't provide a model to test, because some reasons.

alejandroarmas commented 2 years ago

@petuca @yuanfz98 Hello would this be a good first contribution to make? Thank you!

petuca commented 2 years ago

Hi,

This issue is already solved in PR #11729.

@alejandroarmas