mbs-octoml commented on code in PR #11003:
URL: https://github.com/apache/tvm/pull/11003#discussion_r852230388
##########
src/runtime/vm/vm.cc:
##########
@@ -303,13 +303,12 @@ void
VirtualMachine::SetInputTensorWithIndex(std::vector<ObjectRef>& tensors,
if (inp_tensor.type_code() == kTVMDLTensorHandle) {
// Automatically convert input DLTensors to NDArray
DLTensor* tensor = inp_tensor;
- std::vector<int64_t> shape;
- for (int64_t i = 0; i < tensor->ndim; i++) {
- shape.push_back(tensor->shape[i]);
+ if (dev.device_type == tensor->device.device_type &&
Review Comment:
Thanks for that. Yeah, the codebase is not at all 'device_id clean' and will
require an audit to find all the places it is either ignored or defaulted to
'0'. One step at a time.
--
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]