Added Windows Support to C++ RPC Server

I just checked in to my fork Windows support for @FrozenGene’s C++ RPC Server.

To get around the lack of fork(), I do some IPC with some named events and mmap file and duplicate the socket so the child proc can use it. On my PC, its only ~50ms overhead to spawn the child proc, which is a huge gain over what I was doing for Windows in python, which was over 1000ms.

I also require WSL to be installed because I use that for tar support. Clang for Windows (prebuilt bins) is also required because I use that to compile (It was easy to support) and just assumed faster compilation.

Because I don’t think there’s much use for this without my other changes in my branch to support Windows (which I don’t plan on doing a PR for), I took some liberties:

I did go through a bunch of previous failed attempts, before falling back to the IPC / Child process method. I tried to do it in process, but after so many trials, there was a huge ‘leak’ in GPU memory, once I thought I had that fixed, cuda API would eventually return a “device unavailable or busy” error. I believe this must be a driver bug.

Anyways, just thought I’d share. :slight_smile:

5 Likes