Thrsu opened a new issue, #15759:
URL: https://github.com/apache/tvm/issues/15759

   I encountered an assertion error while attempting to convert a torch.fx 
model with interpolation using TVM. 
   
   ### Actual behavior
   
   ```
   Traceback (most recent call last):
     ...
         mod = from_fx(fx_model, input_info)
     File 
"/workplace/software/tvm/tvm/python/tvm/relax/frontend/torch/fx_translator.py", 
line 1475, in from_fx
       return TorchFXImporter().from_fx(
     File 
"/workplace/software/tvm/tvm/python/tvm/relax/frontend/torch/fx_translator.py", 
line 1362, in from_fx
       self.env[node] = self.convert_map[func_name](node)
     File 
"/workplace/software/tvm/tvm/python/tvm/relax/frontend/torch/fx_translator.py", 
line 1008, in _interpolate
       assert recompute_scale_factor is None
   AssertionError
   ```
   
   ### Environment
   
   - branch: unity
   - tvm: v0.14.dev0-595-gfa0d35b
   - torch: 2.0.1
   
   ### Steps to reproduce
   
   ```python
   import torch
   from torch import fx
   from torch.nn import Module
   import tvm
   from tvm import relax
   from tvm.relax.frontend.torch import from_fx
   
   input_data = torch.randn([5, 5, 10, 10], dtype=torch.float32)
   para_1 = 4
   para_2 = None
   para_3 = 'bicubic'
   para_4 = None
   para_5 = False
   class interpolate(Module):
       def forward(self, input):
           return torch.nn.functional.interpolate(input, 
para_1,para_2,para_3,para_4,para_5,)
   model = interpolate().float()
   input_info = list(zip([list(inp.shape) for inp in input_data], 
[str(inp.dtype) for inp in input_data]))
   fx_model : torch.fx.GraphModule = fx.symbolic_trace(model)
   with torch.no_grad():
       mod = from_fx(fx_model, input_info)
   ```
   ### Triage
   
   * needs-triage
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to