jroesch opened a new issue #6489:
URL: https://github.com/apache/incubator-tvm/issues/6489


   cc @hypercubestart after I land #6274 there is an issue where omitting a 
return type now causes inference to fail, when you work on mutual recursion can 
you look into this?
   
   ```
    // (@jroesch): if we leave off the return type this doesn't work
   /*
    * Computes the sum of a list of integer scalars.
    */
    // (@jroesch): if we leave off the return type this doesn't work
   def @sum(%xs: List[Tensor[(), int32]]) -> int32 {
     let %add_f = fn(%x: Tensor[(), int32], %y: Tensor[(), int32]) -> 
Tensor[(), int32] {
       %x + %y
     };
     @foldl(%add_f, 0, %xs)
   }
   
   ```
   /*
    * Computes the size of a tree.
    */
   def @size[A](%t: Tree[A]) -> Tensor[(), int32] {
     match(%t) {
       Rose(_, %sub_trees) => {
         1 + @sum(@map(@size, %sub_trees))
       },
     }
   }
   
   ```


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