You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "taomiao (via GitHub)" <gi...@apache.org> on 2024/01/17 12:36:43 UTC

[I] [Bug] linspace op gets wrong result [tvm]

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

   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
   
   work well
   
   ### Actual behavior
   
   ```
   test_forward.py:211: in verify_model
       assert_shapes_match(baseline_output, output)
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   
   tru = array([0.       , 0.8888889, 1.7777778, 2.6666667, 3.5555556, 4.4444447,
          5.3333335, 6.2222223, 7.111111 , 8.       ], dtype=float32)
   est = array([0.       , 0.8888889, 1.7777778, 2.6666667, 3.5555556, 4.4444447,
          5.3333335, 6.2222223, 7.111111 , 8.       , 8.888889 ],
         dtype=float32)
   
       def assert_shapes_match(tru, est):
           """Verfiy whether the shapes are equal"""
           if tru.shape != est.shape:
               msg = "Output shapes {} and {} don't match"
   >           raise AssertionError(msg.format(tru.shape, est.shape))
   E           AssertionError: Output shapes (10,) and (11,) don't match
   ```
   
   ### Environment
   
   os: ubuntu
   python: 3.9
   pytorch: 2.0
   tvm: main branch
   
   ### Steps to reproduce
   
   ```
   @tvm.testing.uses_gpu
   def test_forward_linspace():
       """test_forward_linspace"""
       torch.set_grad_enabled(False)
   
       class Linspace9(Module):
           def forward(self, *args):
               return torch.linspace(0, 8, 10)
   
       verify_model(Linspace9().float().eval())
   ```
   
   ### Triage
   
   Please refer to the list of label tags [here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the relevant tags and add them below in a bullet format (example below).
   
   * 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: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] linspace op gets wrong result [tvm]

Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi closed issue #16416: [Bug] linspace op gets wrong result
URL: https://github.com/apache/tvm/issues/16416


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org