You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "slyubomirsky (via GitHub)" <gi...@apache.org> on 2023/03/13 17:05:46 UTC

[GitHub] [tvm] slyubomirsky commented on a diff in pull request #14282: [Unity][BuiltinOp][Transform] Introduce data-dependent operation of reshape and its constant folding

slyubomirsky commented on code in PR #14282:
URL: https://github.com/apache/tvm/pull/14282#discussion_r1134330594


##########
src/runtime/relax_vm/builtin.cc:
##########
@@ -380,6 +380,40 @@ TVM_REGISTER_GLOBAL("vm.builtin.make_tuple").set_body([](TVMArgs args, TVMRetVal
   *rv = arr;
 });
 
+TVM_REGISTER_GLOBAL("vm.builtin.tensor_to_shape").set_body_typed([](NDArray data) {
+  NDArray arr = data;
+  if (data->device.device_type != kDLCPU) {

Review Comment:
   I assume it's to avoid data movement if the tensor isn't on CPU. Perhaps we should incorporate data movement if it's necessary



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