You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/06 21:12:01 UTC

[GitHub] [incubator-tvm] tkonolige commented on pull request #6858: [FIX,RPC] Skip RPC tests when using multiprocessing's spawn method

tkonolige commented on pull request #6858:
URL: https://github.com/apache/incubator-tvm/pull/6858#issuecomment-723301559


   > This is because some of the register_func are in local function scope instead of global, so they won't be executed right after spawn. Globally registered packedfunc will be preserved
   
   This is what I thought initially, but something weirder is going on. The globally registered packedfunc works when you run the test script on its own (without pytest). But when running under pytest, the registered functions cannot be found. I commented about it in the source code: 
   ```
   # tkonolige: The issue as I understand it is this: multiprocessing's spawn
    # method launches a new process and then imports the relevant modules. This
    # means that all registered functions must exist at the top level scope. In
    # this file they are, so all is well when we run this file directly.
    # However, when run under pytest, the functions aren't registered on the
    # server. I believe this is because pytest is also using multiprocessing to
    # run individual functions. Somewhere along the way, the imports are being
    # lost, so the server ends up not registering the functions.
   ```


----------------------------------------------------------------
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:
users@infra.apache.org