jikechao opened a new issue, #15281: URL: https://github.com/apache/tvm/issues/15281
For the layer instance, TVM gives different results with Pytorch. torch.nn.functional.max_pool2d(torch.randn([7, 175, 5, 3]), kernel_size=3,padding=1,ceil_mode=True) ### Actual behavior  ### Steps to reproduce ``` import torch from tvm import relay import tvm import numpy as np from torch.nn import Module input_data = torch.randn([7, 175, 5, 3], dtype=torch.float32) class max_pool2d(Module): def forward(self, *args): return torch.nn.functional.max_pool2d(args[0], kernel_size=3,padding=1,ceil_mode=True) m = max_pool2d().float().eval() torch_outputs = m(input_data) trace = torch.jit.trace(m, input_data) input_shapes = [('input0', torch.Size([7, 175, 5, 3]))] mod, params = relay.frontend.from_pytorch(trace, input_shapes) with tvm.transform.PassContext(opt_level=3): exe = relay.create_executor('graph', mod=mod, params=params, device=tvm.device('llvm', 0), target='llvm').evaluate() input_tvm = {'input0': np.array(input_data, dtype='float32')} tvm_outputs = exe(**input_tvm).asnumpy() np.testing.assert_allclose(torch_outputs, tvm_outputs, rtol=1e-3, atol=1e-3) ``` ### Triage * needs-triage * frontend:pytorch -- 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]
