Problem is running iOS sample

Hi @Laurawly, @tqchen and @srkreddy1238 I am facing problem while running iOS_rpc sample. It show below error.

(base)Mac-mini:tests macmini$ python ios_rpc_test.py 
Traceback (most recent call last):
  File "ios_rpc_test.py", line 32, in <module>
    proxy_host = os.environ["TVM_IOS_RPC_PROXY_HOST"]
  File "/usr/local/miniconda3/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'TVM_IOS_RPC_PROXY_HOST'

There is no key called “TVM_IOS_RPC_PROXY_HOST” in os environment variables.

As suggested in error, did you set the environment variable TVM_IOS_RPC_PROXY_HOST on your machine?

Hi @Lyken17,

yes I set TVM_IOS_RPC_PROXY_HOST to 0.0.0.0 and TVM_IOS_RPC_DESTINATION to 127.0.0.1 but still i am facing error. And how to run it for CPU instead of iOS. Thanks for your support @Lyken17.

Can you paste your error message?

Hi @Lyken17 I am trying to run tvm iOS-rpc sample application from tvm/app/ios-rpc for metal CPU I ran python -m tvm.exec.rpc_proxy and it successfully returns INFO:root:RPCProxy: client port bind to 0.0.0.0:9090
INFO:root:RPCProxy: Websock port bind to 8888

  • My doubt is what is key for Mac CPU in sample app it is key=“iPhone” for CPU?
  • TVM_IOS_RPC_PROXY_HOST is by default it is 0.0.0.0, whether I need to change is to my system IP?
  • What is TVM_IOS_CODESIGN? How to create it?

Note: I am not using iOS device I am trying it for Mac CPU with metal.

I am facing this error when I tried to run the sample application from tvm.

File “/Users/macmini/Mallappa/tvm/src/runtime/rpc/rpc_socket_impl.cc”, line 80
TVMError: URL 0.0.0.0:9090 cannot find server that matches key=client:iphone