mbs-octoml commented on a change in pull request #9848:
URL: https://github.com/apache/tvm/pull/9848#discussion_r793166627



##########
File path: src/relay/op/memory/on_device.cc
##########
@@ -144,9 +144,11 @@ OnDeviceProps GetOnDeviceProps(const Expr& expr) {
 
 Function FunctionOnDevice(Function function, Array<VirtualDevice> 
param_virtual_devices,
                           VirtualDevice result_virtual_device) {
-  return WithAttrs(std::move(function),
-                   {{tvm::attr::kParamVirtualDevice, 
std::move(param_virtual_devices)},
-                    {tvm::attr::kResultVirtualDevice, 
std::move(result_virtual_device)}});
+  auto func = WithAttrs(

Review comment:
       mega nit, ignore if already green: can be just WithAttr.

##########
File path: src/printer/relay_text_printer.cc
##########
@@ -458,6 +458,7 @@ Doc RelayTextPrinter::PrintFunc(const Doc& prefix, const 
relay::Function& fn) {
   if (fn->ret_type.defined()) {
     doc << "-> " << Print(fn->ret_type) << " ";
   }
+  doc << "Virtual Device: " << Print(fn->virtual_device()) << " \n";

Review comment:
       suggest /* device=... */ so the output is (at least in principle) 
parsable.




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