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 
Traceback (most recent call last):
  File "", line 32, in <module>
    proxy_host = os.environ["TVM_IOS_RPC_PROXY_HOST"]
  File "/usr/local/miniconda3/lib/python3.7/", line 678, in __getitem__
    raise KeyError(key) from None

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 and TVM_IOS_RPC_DESTINATION to 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
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, 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/”, line 80
TVMError: URL cannot find server that matches key=client:iphone