apivovarov commented on pull request #7513:
URL: https://github.com/apache/tvm/pull/7513#issuecomment-786486157


   Net
   ```
   class Net(torch.nn.Module):
       def __init__(self):
           super(Net, self).__init__()
       def forward(self, a,b):
           a[0] = b[0]
           c = a + b
           return c
   ```
   
   Torch graph:
   ```
   graph(%self : __torch__.Net,
         %a : Long(4, strides=[1], requires_grad=0, device=cpu),
         %b : Long(4, strides=[1], requires_grad=0, device=cpu)):
     %5 : int = prim::Constant[value=0]() # <stdin>:5:0
     %6 : int = prim::Constant[value=0]() # <stdin>:5:0
     %7 : Long(requires_grad=0, device=cpu) = aten::select(%b, %5, %6) # 
<stdin>:5:0
     %8 : int = prim::Constant[value=0]() # <stdin>:5:0
     %9 : int = prim::Constant[value=0]() # <stdin>:5:0
     %10 : Long(requires_grad=0, device=cpu) = aten::select(%a, %8, %9) # 
<stdin>:5:0
     %11 : bool = prim::Constant[value=0]()
     %12 : Long(requires_grad=0, device=cpu) = aten::copy_(%10, %7, %11) # 
<stdin>:5:0
     %13 : int = prim::Constant[value=1]() # <stdin>:6:0
     %14 : Long(4, strides=[1], requires_grad=0, device=cpu) = aten::add(%a, 
%b, %13) # <stdin>:6:0
     return (%14)
   ```
   Relay graph has `add` operator only:
   ```
   fn (%input0: Tensor[(4), int64], %input1: Tensor[(4), int64]) {
     add(%input0, %input1)
   }
   ```
   `a[0] = b[0]` was not included to the Relay graph


----------------------------------------------------------------
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.

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


Reply via email to