slyubomirsky commented on issue #15319:
URL: https://github.com/apache/tvm/issues/15319#issuecomment-1642660722

   @tqchen A question about implementing one of the relatively simple cases, an 
in-place operation where the result is smaller than the input. I discussed with 
@MasterJH5574 and we weren't entirely sure about how this should work.
   
   Let's suppose we have a call `out = call_tir_inplace(some_func, (t1,), 
return_shape)`, where `return_shape` is smaller (in at least one dimension) 
than `t1`. `out` will be treated as a tensor of the smaller shape 
(`return_shape`), but will in reality be stored in the same place as `t1`. 
@MasterJH5574 points out that slicing is an example where this could arise.
   
   The question is, do we need to have any special handling in the memory 
planner for this case? Would Relax's runtime treat `out` as being of `t1`'s 
shape even though it's supposed to be smaller? Where might we need to make 
changes to handle this case? I could imagine some difficulties potentially 
arising with stride, layout, etc.
   
   (For now, I will implement the scenario where the output shape matches the 
input shape exactly.)


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

Reply via email to