electriclilies commented on a change in pull request #10352:
URL: https://github.com/apache/tvm/pull/10352#discussion_r813440645



##########
File path: src/relay/backend/vm/compiler.cc
##########
@@ -252,21 +252,16 @@ class VMFunctionCompiler : 
DeviceAwareExprFunctor<void(const Expr& n)> {
       // Do that flattening on-the-fly here.
       Function inner_func = Downcast<Function>(func->body);
       std::vector<Var> params;
-      std::vector<VirtualDevice> param_virtual_devices;
       params.reserve(func->params.size() + inner_func->params.size());
-      param_virtual_devices.reserve(func->params.size() + 
inner_func->params.size());
       param_device_indexes.reserve(func->params.size() + 
inner_func->params.size());
       for (size_t i = 0; i < func->params.size(); ++i) {
         params.emplace_back(func->params[i]);
-        VirtualDevice param_virtual_device = 
GetFunctionParamVirtualDevice(func.get(), i);
-        param_virtual_devices.push_back(param_virtual_device);
-        param_device_indexes.push_back(GetDeviceIndex(param_virtual_device));
+        
param_device_indexes.push_back(GetDeviceIndex(func->params[i]->virtual_device()));

Review comment:
       yeah!!




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