No no no, I don’t think you understand the post. The correct thing is to do is to create a new source file worker.py with all your code in it and then in Jupyter Notebook you call worker.run("cuda"). You don’t need to use multiprocessing manually.