merrymercy commented on a change in pull request #6391:
URL: https://github.com/apache/incubator-tvm/pull/6391#discussion_r483899674



##########
File path: python/tvm/autotvm/measure/measure_methods.py
##########
@@ -511,10 +511,12 @@ def run_through_rpc(measure_input, build_result,
         if ref_input:
             args = [nd.array(x, ctx=ctx) for x in ref_input]
         else:
-            # create empty arrays on the remote device and copy them once.
-            # This can avoid some memory issues that make the measurement 
results unreliable.
+            assert tvm.get_global_func("tvm.contrib.random.random_fill", 
True), \
+                "Please make sure USE_RANDOM is ON in the config.cmake"
+            random_fill = remote.get_function("tvm.contrib.random.random_fill")

Review comment:
       The check should be done on the remote device, so L514 is useless.
   In addition, we should use try-catch to capture the error from remote 
devices and mention "remote" in the error message. e.g.,
   ```Please make sure USE_RANDOM is ON in the config.cmake on the remote 
devices```
   
   This is important because `config.cmake` on remote devices won't be updated 
by `git pull` and rebuild.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to