taomiao opened a new issue, #15832: URL: https://github.com/apache/tvm/issues/15832
Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :smile_cat: Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed. ### Expected behavior successfully run ### Actual behavior InternalError: Check failed: fshape_func.count(op) > 0 (0 vs. 0) : Internal error, cannot find ShapeFunc for sin ### Environment Operating System: ubuntu 20.04 TVM version: 0.14.dev194+ga096b4cd0 ### Steps to reproduce `import torch import tvm from tvm import relay class DSmodel(torch.nn.Module): def __init__(self): super().__init__() def forward(self, positions, freqs=2): gt0 = positions>0 gt0_idx = gt0.nonzero(as_tuple=True) positions = positions[gt0_idx] freq_bands = (2 ** torch.arange(freqs).float()).to(positions.device) # (F,) pts = (positions[..., None] * freq_bands).reshape( positions.shape[:-1] + (freqs * positions.shape[-1],)) # (..., DF) pts = torch.cat([torch.sin(pts), torch.cos(pts)], dim=-1) return pts model = DSmodel() pos = torch.rand([20, 3]) pt_mod = torch.jit.trace(model, example_inputs=(pos,)) mod, params = relay.frontend.from_pytorch(pt_mod, [("input0", (20, 3))]) print(mod) target = tvm.target.Target(target="llvm") device = tvm.device(target.kind.name, 0) func = tvm.relay.create_executor(kind="vm", mod=mod, target=target, device=device).evaluate() func(pos.numpy())` ### 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]
