jmorrill opened a new pull request #4548: Windows support for autotvm - Do not 
merge
URL: https://github.com/apache/incubator-tvm/pull/4548
 
 
   This PR is not meant to give anyone a heart attack. @soiferj encouraged me 
to submit this PR so he could take a peek.  So please don't code review 
seriously for merge.  Feel free to close if you don't want to look at it :)
   
   Two discuss topics related:
   https://discuss.tvm.ai/t/unofficial-autotvm-on-windows-guide/4711 (Google 
doc has notes on quirks)
   https://discuss.tvm.ai/t/added-windows-support-to-c-rpc-server/5007
   
   Currently, there is no support for autotvm in Windows out of the box.  Most 
challenges are related to fork() not being supported, which autotvm code uses 
extensively for getting multi-core performance in python.  Having no fork() 
means data sent to process pools must be able to be pickled.  Also, having no 
fork() means python pools or subprocesses need to be reused for performance 
reasons.  This was very apparent in the `local_executor.py`, where starting a 
new python subprocess w/ python entry point could take almost 1000ms.
   
   To overcome these issues I have opted to use pathos library in some spots 
which uses dill to serialize.  dill can serialize much more than pickle, 
notably functions.
   
   I've tried to keep the linux behavior the same, but have not tested it.   
Most of the time I "ifdef"ed the python code with `os.name == 'nt'` so it was 
easy to spot.
   
   Notable problems are:
   
   - Need to fix ipv6 in `base.py` `get_addr_family`
   - If IP_ANY (0.0.0.0) was having trouble, so i replaced IP_ANY with 127.0.0.1
   - local_executor.py, timeouts are not supported because a pool is used for 
perf reasons.  Timeouts will work on RPC server side if using the C++ RPC 
server.
   - I'm new to Python, so things may be able to be expressed better
   - Took some liberties with C++ RPC and main CMakeLists.txt, which may not be 
appreciated 
   - Python RPC server, I restart the python subprocess after n-trials as some 
cuda kernels cause big leaks and killing the proc is the only way to fix.  I 
suggest the C++ RPC server as its much faster.
   - Possibly many more.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to