Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNN can not be quantized by aimet #3175

Open
TingfengTang opened this issue Jul 17, 2024 · 1 comment
Open

RNN can not be quantized by aimet #3175

TingfengTang opened this issue Jul 17, 2024 · 1 comment

Comments

@TingfengTang
Copy link

Hi,when i use aimet to quantize my rnn model,some tracing error happens.

import torch
import torch.nn as nn
from aimet_torch.model_preparer import prepare_model
rnn=nn.RNN(10,20,1)
rnn=prepare_model(rnn)
torch.fx.proxy.TraceError:symbolically traced variables cannot be used as inputs to control flow

it seems that nn.RNN can not be traced by torch.fx
so i use torch.fx.symbolic_trace to directly trace the torch.nn.Rnn(10,20,1),but also failed
the wheel i installed is aimet_torch-torch_cpu_pt19_1.31.0-cp38-cp38-linux_x86_64.whl

@RangineniBalaji
Copy link

@TingfengTang This is the issue caused by torch. To solve this remove the control flow(if, else) and hardcode the process without control flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants